pub struct ValidGeneveOpt<V: ByteSlice>(pub Accessor<V, GeneveOptPart0>, pub HeaderOf<Vec<u8>, V>);Tuple Fields§
§0: Accessor<V, GeneveOptPart0>§1: HeaderOf<Vec<u8>, V>Trait Implementations§
Source§impl<V: ByteSlice> Emit for ValidGeneveOpt<V>
impl<V: ByteSlice> Emit for ValidGeneveOpt<V>
Source§fn emit_raw<B: ByteSliceMut>(&self, buf: B) -> usize
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
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,
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>where
V: SplitByteSliceMut,
fn emit_prefix<V>(&self, buf: V) -> Result<V, ParseError>where
V: SplitByteSliceMut,
Writes this packet’s contents into the start of a target buffer.
Source§fn emit_suffix<V>(&self, buf: V) -> Result<V, ParseError>where
V: SplitByteSliceMut,
fn emit_suffix<V>(&self, buf: V) -> Result<V, ParseError>where
V: SplitByteSliceMut,
Writes this packet’s contents at the end of a target buffer.
Source§fn emit_uninit(&self, buf: &mut [MaybeUninit<u8>]) -> Result<usize, ParseError>where
Self: EmitDoesNotRelyOnBufContents,
fn emit_uninit(&self, buf: &mut [MaybeUninit<u8>]) -> Result<usize, ParseError>where
Self: EmitDoesNotRelyOnBufContents,
Writes this packet’s contents into uninitialised memory.
Source§fn emit_vec(&self) -> Vec<u8> ⓘwhere
Self: EmitDoesNotRelyOnBufContents,
fn emit_vec(&self) -> Vec<u8> ⓘwhere
Self: EmitDoesNotRelyOnBufContents,
Writes this packet’s contents into a newly allocated
Vec of length
Header::packet_length, without zero-filling the contents. Read moreimpl<V: ByteSlice> EmitDoesNotRelyOnBufContents for ValidGeneveOpt<V>
Source§impl<V: ByteSlice> From<&ValidGeneveOpt<V>> for GeneveOpt
impl<V: ByteSlice> From<&ValidGeneveOpt<V>> for GeneveOpt
Source§fn from(val: &ValidGeneveOpt<V>) -> Self
fn from(val: &ValidGeneveOpt<V>) -> Self
Converts to this type from the input type.
Source§impl<V: ByteSlice> From<ValidGeneveOpt<V>> for InlineHeader<GeneveOpt, ValidGeneveOpt<V>>
impl<V: ByteSlice> From<ValidGeneveOpt<V>> for InlineHeader<GeneveOpt, ValidGeneveOpt<V>>
Source§fn from(value: ValidGeneveOpt<V>) -> Self
fn from(value: ValidGeneveOpt<V>) -> Self
Converts to this type from the input type.
Source§impl<V: ByteSlice> From<ValidGeneveOpt<V>> for BoxedHeader<GeneveOpt, ValidGeneveOpt<V>>
impl<V: ByteSlice> From<ValidGeneveOpt<V>> for BoxedHeader<GeneveOpt, ValidGeneveOpt<V>>
Source§fn from(value: ValidGeneveOpt<V>) -> Self
fn from(value: ValidGeneveOpt<V>) -> Self
Converts to this type from the input type.
Source§impl<V: ByteSliceMut> GeneveOptMut<V> for ValidGeneveOpt<V>
impl<V: ByteSliceMut> GeneveOptMut<V> for ValidGeneveOpt<V>
fn set_class(&mut self, val: u16be)
fn set_option_type(&mut self, val: GeneveOptionType)
fn option_type_mut(&mut self) -> &mut GeneveOptionType
fn set_reserved(&mut self, val: u3)
fn set_length(&mut self, val: u5)
fn data_mut(&mut self) -> FieldMut<'_, Vec<u8>, V>
Source§impl<V: ByteSlice> GeneveOptRef<V> for ValidGeneveOpt<V>
impl<V: ByteSlice> GeneveOptRef<V> for ValidGeneveOpt<V>
Source§impl<V: ByteSlice> HasRepr for ValidGeneveOpt<V>
impl<V: ByteSlice> HasRepr for ValidGeneveOpt<V>
Source§impl<V: ByteSlice> HeaderLen for ValidGeneveOpt<V>
impl<V: ByteSlice> HeaderLen for ValidGeneveOpt<V>
Source§const MINIMUM_LENGTH: usize
const MINIMUM_LENGTH: usize
The minimum number of bytes a packet of this kind occupies
when serialised.
Source§fn packet_length(&self) -> usize
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 ValidGeneveOpt<V>
impl<'a, V: SplitByteSlice + IntoBufPointer<'a> + 'a> HeaderParse<V> for ValidGeneveOpt<V>
Source§fn parse_choice(
from: V,
_hint: Option<Self::Hint>,
) -> ParseResult<Success<Self, V>>
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§impl<V: ByteSlice> NextLayer for ValidGeneveOpt<V>
impl<V: ByteSlice> NextLayer for ValidGeneveOpt<V>
Source§impl<V: SplitByteSlice> ToOwnedPacket for ValidGeneveOpt<V>
impl<V: SplitByteSlice> ToOwnedPacket for ValidGeneveOpt<V>
Auto Trait Implementations§
impl<V> !Send for ValidGeneveOpt<V>
impl<V> !Sync for ValidGeneveOpt<V>
impl<V> Freeze for ValidGeneveOpt<V>where
V: Freeze,
impl<V> RefUnwindSafe for ValidGeneveOpt<V>where
V: RefUnwindSafe,
impl<V> Unpin for ValidGeneveOpt<V>where
V: Unpin,
impl<V> UnsafeUnpin for ValidGeneveOpt<V>where
V: UnsafeUnpin,
impl<V> UnwindSafe for ValidGeneveOpt<V>where
V: UnwindSafe,
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