pub struct GENEVEOptionPacket<'p> { /* private fields */ }Expand description
A structure enabling manipulation of on the wire packets
Implementations§
Source§impl<'a> GENEVEOptionPacket<'a>
impl<'a> GENEVEOptionPacket<'a>
Sourcepub fn new(packet: &[u8]) -> Option<GENEVEOptionPacket<'_>>
pub fn new(packet: &[u8]) -> Option<GENEVEOptionPacket<'_>>
Constructs a new GeneveOptionPacket. If the provided buffer is less than the minimum required packet size, this will return None.
Sourcepub const fn minimum_packet_size() -> usize
pub const fn minimum_packet_size() -> usize
The minimum size (in bytes) a packet of this type can be. It’s based on the total size of the fixed-size fields.
Sourcepub fn get_option_class(&self) -> u16be
pub fn get_option_class(&self) -> u16be
Get Option Class
Sourcepub fn get_option_type(&self) -> u8
pub fn get_option_type(&self) -> u8
Get Option Type
Sourcepub fn get_option_length(&self) -> u5
pub fn get_option_length(&self) -> u5
Get the Option Length field
Trait Implementations§
Source§impl<'p> FromPacket for GENEVEOptionPacket<'p>
impl<'p> FromPacket for GENEVEOptionPacket<'p>
Source§type T = GENEVEOption
type T = GENEVEOption
The type of the packet to convert from.
Source§fn from_packet(&self) -> GENEVEOption
fn from_packet(&self) -> GENEVEOption
Converts a wire-format packet to #[packet] struct format.
Source§impl<'a> Packet for GENEVEOptionPacket<'a>
impl<'a> Packet for GENEVEOptionPacket<'a>
Source§impl<'a> PacketSize for GENEVEOptionPacket<'a>
impl<'a> PacketSize for GENEVEOptionPacket<'a>
Source§fn packet_size(&self) -> usize
fn packet_size(&self) -> usize
Get the calculated size of the packet.
Source§impl<'p> PartialEq for GENEVEOptionPacket<'p>
impl<'p> PartialEq for GENEVEOptionPacket<'p>
impl<'p> StructuralPartialEq for GENEVEOptionPacket<'p>
Auto Trait Implementations§
impl<'p> Freeze for GENEVEOptionPacket<'p>
impl<'p> RefUnwindSafe for GENEVEOptionPacket<'p>
impl<'p> Send for GENEVEOptionPacket<'p>
impl<'p> Sync for GENEVEOptionPacket<'p>
impl<'p> Unpin for GENEVEOptionPacket<'p>
impl<'p> UnwindSafe for GENEVEOptionPacket<'p>
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