pub struct Ipv4Option<'a> {
    pub copied: bool,
    pub data: Ipv4OptionData<'a>,
}
Expand description

An IPv4 header option.

An IPv4 header option comprises metadata about the option (which is stored in the kind byte) and the option itself.

See Wikipedia or RFC 791 for more details.

Fields§

§copied: bool

Whether this option needs to be copied into all fragments of a fragmented packet.

§data: Ipv4OptionData<'a>

IPv4 option data.

Trait Implementations§

source§

impl<'a> Clone for Ipv4Option<'a>

source§

fn clone(&self) -> Ipv4Option<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for Ipv4Option<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> OptionBuilder for Ipv4Option<'a>

§

type Layout = Ipv4OptionsImpl

Information about the option’s layout.
source§

fn serialized_len(&self) -> usize

Returns the serialized length, in bytes, of self. Read more
source§

fn option_kind(&self) -> u8

Returns the wire value for this option kind.
source§

fn serialize_into(&self, buffer: &mut [u8])

Serializes self into data. Read more
source§

impl<'a> PartialEq for Ipv4Option<'a>

source§

fn eq(&self, other: &Ipv4Option<'a>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'a> Eq for Ipv4Option<'a>

source§

impl<'a> StructuralPartialEq for Ipv4Option<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for Ipv4Option<'a>

§

impl<'a> RefUnwindSafe for Ipv4Option<'a>

§

impl<'a> Send for Ipv4Option<'a>

§

impl<'a> Sync for Ipv4Option<'a>

§

impl<'a> Unpin for Ipv4Option<'a>

§

impl<'a> UnwindSafe for Ipv4Option<'a>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<O> RecordBuilder for O
where O: OptionBuilder,

§

fn serialized_len(&self) -> usize

Provides the serialized length of a record. Read more
§

fn serialize_into(&self, data: &mut [u8])

Serializes self into a buffer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more