pub struct OptionHeader { /* private fields */ }Expand description
The header of an OPT option.
This header contains a 16 bit option code identifying the kind of option we are dealing with and a 16 bit length describing the lenngth in octets of the option data.
Implementations§
Source§impl OptionHeader
impl OptionHeader
Sourcepub fn new(code: u16, len: u16) -> OptionHeader
pub fn new(code: u16, len: u16) -> OptionHeader
Creates a new option header from code and length.
pub fn parse<Octs>( parser: &mut Parser<'_, Octs>, ) -> Result<OptionHeader, ParseError>
Trait Implementations§
Source§impl Clone for OptionHeader
impl Clone for OptionHeader
Source§fn clone(&self) -> OptionHeader
fn clone(&self) -> OptionHeader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for OptionHeader
Auto Trait Implementations§
impl Freeze for OptionHeader
impl RefUnwindSafe for OptionHeader
impl Send for OptionHeader
impl Sync for OptionHeader
impl Unpin for OptionHeader
impl UnsafeUnpin for OptionHeader
impl UnwindSafe for OptionHeader
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
Source§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.
Source§fn octets_into(self) -> Target
fn octets_into(self) -> Target
Performs an infallible conversion.