pub struct Padding { /* private fields */ }
Implementations§
source§impl Padding
impl Padding
pub fn new(len: u16) -> Self
pub fn new_with_mode(len: u16, mode: PaddingMode) -> Self
pub fn push<Target: OctetsBuilder + AsRef<[u8]> + AsMut<[u8]>>( builder: &mut OptBuilder<'_, Target>, len: u16 ) -> Result<(), ShortBuf>
pub fn push_with_mode<Target: OctetsBuilder + AsRef<[u8]> + AsMut<[u8]>>( builder: &mut OptBuilder<'_, Target>, len: u16, mode: PaddingMode ) -> Result<(), ShortBuf>
pub fn len(self) -> u16
pub fn is_empty(self) -> bool
pub fn mode(self) -> PaddingMode
Trait Implementations§
source§impl CodeOptData for Padding
impl CodeOptData for Padding
source§const CODE: OptionCode = OptionCode::Padding
const CODE: OptionCode = OptionCode::Padding
The option code for this option.
source§impl Compose for Padding
impl Compose for Padding
source§impl<Octets> From<Padding> for AllOptData<Octets>
impl<Octets> From<Padding> for AllOptData<Octets>
source§impl PartialEq<Padding> for Padding
impl PartialEq<Padding> for Padding
impl Copy for Padding
impl Eq for Padding
impl StructuralEq for Padding
impl StructuralPartialEq for Padding
Auto Trait Implementations§
impl RefUnwindSafe for Padding
impl Send for Padding
impl Sync for Padding
impl Unpin for Padding
impl UnwindSafe for Padding
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere Target: OctetsFrom<Source>,
source§fn octets_into(self) -> Result<Target, ShortBuf>
fn octets_into(self) -> Result<Target, ShortBuf>
Performs the conversion.
source§impl<T> OptData for Twhere
T: CodeOptData + Compose,
impl<T> OptData for Twhere T: CodeOptData + Compose,
source§fn code(&self) -> OptionCode
fn code(&self) -> OptionCode
Returns the option code associated with this option.
source§impl<Octets, T> ParseOptData<Octets> for Twhere
Octets: AsRef<[u8]>,
T: CodeOptData + Parse<Octets> + Compose,
impl<Octets, T> ParseOptData<Octets> for Twhere Octets: AsRef<[u8]>, T: CodeOptData + Parse<Octets> + Compose,
source§fn parse_option(
code: OptionCode,
parser: &mut Parser<Octets>
) -> Result<Option<T>, ParseError>
fn parse_option( code: OptionCode, parser: &mut Parser<Octets> ) -> Result<Option<T>, ParseError>
Parses the option code data. Read more