Skip to main content

ValidIpV6ExtFragment

Struct ValidIpV6ExtFragment 

Source
pub struct ValidIpV6ExtFragment<V: ByteSlice>(pub Accessor<V, IpV6ExtFragmentPart0>);

Tuple Fields§

§0: Accessor<V, IpV6ExtFragmentPart0>

Trait Implementations§

Source§

impl<V: ByteSlice> Emit for ValidIpV6ExtFragment<V>

Source§

fn emit_raw<B: ByteSliceMut>(&self, buf: B) -> usize

Writes this packet’s contents into a target buffer without performing length checks. Read more
Source§

fn needs_emit(&self) -> bool

Returns whether this packet needs a full re-emit, and has not been simply modified in-place. Read more
Source§

fn emit<V>(&self, buf: V) -> Result<usize, ParseError>
where V: ByteSliceMut,

Writes this packet’s contents into a target buffer.
Source§

fn emit_prefix<V>(&self, buf: V) -> Result<V, ParseError>

Writes this packet’s contents into the start of a target buffer.
Source§

fn emit_suffix<V>(&self, buf: V) -> Result<V, ParseError>

Writes this packet’s contents at the end of a target buffer.
Source§

fn to_vec(&self) -> Vec<u8>

Writes this packet’s contents into a newly allocated Vec of length Header::packet_length. Read more
Source§

fn emit_uninit(&self, buf: &mut [MaybeUninit<u8>]) -> Result<usize, ParseError>

Writes this packet’s contents into uninitialised memory.
Source§

fn emit_vec(&self) -> Vec<u8>

Writes this packet’s contents into a newly allocated Vec of length Header::packet_length, without zero-filling the contents. Read more
Source§

impl<V: ByteSlice> EmitDoesNotRelyOnBufContents for ValidIpV6ExtFragment<V>

Source§

impl<V: ByteSlice> From<&ValidIpV6ExtFragment<V>> for IpV6ExtFragment

Source§

fn from(val: &ValidIpV6ExtFragment<V>) -> Self

Converts to this type from the input type.
Source§

impl<V: ByteSlice> From<ValidIpV6ExtFragment<V>> for InlineHeader<IpV6ExtFragment, ValidIpV6ExtFragment<V>>

Source§

fn from(value: ValidIpV6ExtFragment<V>) -> Self

Converts to this type from the input type.
Source§

impl<V: ByteSlice> From<ValidIpV6ExtFragment<V>> for BoxedHeader<IpV6ExtFragment, ValidIpV6ExtFragment<V>>

Source§

fn from(value: ValidIpV6ExtFragment<V>) -> Self

Converts to this type from the input type.
Source§

impl<V: ByteSlice> HasRepr for ValidIpV6ExtFragment<V>

Source§

type ReprType = IpV6ExtFragment

The type containing an equivalent to Self, as an owned struct.
Source§

impl<V: ByteSlice> HeaderLen for ValidIpV6ExtFragment<V>

Source§

const MINIMUM_LENGTH: usize

The minimum number of bytes a packet of this kind occupies when serialised.
Source§

fn packet_length(&self) -> usize

The number of bytes which this packet would occupy when serialised. Read more
Source§

impl<'a, V: SplitByteSlice + IntoBufPointer<'a> + 'a> HeaderParse<V> for ValidIpV6ExtFragment<V>

Source§

fn parse_choice( from: V, _hint: Option<Self::Hint>, ) -> ParseResult<Success<Self, V>>

Parse a view-type from a given buffer, using a hint
Source§

fn parse(from: B) -> Result<(Self, Option<Self::Denom>, B), ParseError>

Parse a view-type from a given buffer.
Source§

impl<V: ByteSliceMut> IpV6ExtFragmentMut for ValidIpV6ExtFragment<V>

Source§

fn set_next_header(&mut self, val: IpProtocol)

Source§

fn next_header_mut(&mut self) -> &mut IpProtocol

Source§

fn set_reserved(&mut self, val: u8)

Source§

fn reserved_mut(&mut self) -> &mut u8

Source§

fn set_fragment_offset(&mut self, val: u13be)

Source§

fn set_res(&mut self, val: u2)

Source§

fn set_more_frags(&mut self, val: u1)

Source§

fn set_ident(&mut self, val: u32be)

Source§

impl<V: ByteSlice> IpV6ExtFragmentRef for ValidIpV6ExtFragment<V>

Source§

impl<V: ByteSlice> NextLayer for ValidIpV6ExtFragment<V>

Source§

type Denom = IpProtocol

The type of this header’s next-layer hint.
Source§

type Hint = ()

A type used to help parse the header
Source§

fn next_layer_choice(&self, _hint: Option<Self::Hint>) -> Option<Self::Denom>

Try to retrieve this header’s next-layer hint, using a provided hint
Source§

fn next_layer(&self) -> Option<Self::Denom>

Retrieve this header’s next-layer hint, if possible.
Source§

impl<V: SplitByteSlice> ToOwnedPacket for ValidIpV6ExtFragment<V>

Source§

type Target = IpV6ExtFragment

The output type of this conversion.
Source§

fn to_owned(&self, _hint: Option<Self::Hint>) -> ParseResult<Self::Target>

Converts a borrowed view of a header into an owned version, possibly reparsing to do so with the aid of hint.
Source§

impl<V: ByteSlice> TryFrom<ValidLowRentV6Eh<V>> for ValidIpV6ExtFragment<V>

Source§

type Error = ParseError

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

fn try_from(value: ValidLowRentV6Eh<V>) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

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.

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.

Source§

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

Source§

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>,

Source§

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.