Struct netsim_embed::ipv6::FragmentPacket [−][src]
pub struct FragmentPacket<'p> { /* fields omitted */ }
A structure enabling manipulation of on the wire packets
Implementations
impl<'a> FragmentPacket<'a>
[src]
impl<'a> FragmentPacket<'a>
[src]pub fn new(packet: &'p [u8]) -> Option<FragmentPacket<'p>>
[src]
Constructs a new FragmentPacket. If the provided buffer is less than the minimum required packet size, this will return None.
pub fn owned(packet: Vec<u8, Global>) -> Option<FragmentPacket<'static>>
[src]
Constructs a new FragmentPacket. If the provided buffer is less than the minimum required packet size, this will return None. With this constructor the FragmentPacket will own its own data and the underlying buffer will be dropped when the FragmentPacket is.
pub fn to_immutable(&'p self) -> FragmentPacket<'p>
[src]
Maps from a FragmentPacket to a FragmentPacket
pub fn consume_to_immutable(self) -> FragmentPacket<'a>
[src]
Maps from a FragmentPacket to a FragmentPacket while consuming the source
pub const fn minimum_packet_size() -> usize
[src]
The minimum size (in bytes) a packet of this type can be. It’s based on the total size of the fixed-size fields.
pub fn packet_size(_packet: &Fragment) -> usize
[src]
The size (in bytes) of a Fragment instance when converted into a byte-array
pub fn get_next_header(&self) -> IpNextHeaderProtocol
[src]
Get the value of the next_header field
pub fn get_reserved(&self) -> u8
[src]
Get the reserved field.
pub fn get_fragment_offset_with_flags(&self) -> u16
[src]
Get the fragment_offset_with_flags field. This field is always stored big-endian within the struct, but this accessor returns host order.
pub fn get_id(&self) -> u32
[src]
Get the id field. This field is always stored big-endian within the struct, but this accessor returns host order.
impl<'p> FragmentPacket<'p>
[src]
impl<'p> FragmentPacket<'p>
[src]pub fn get_fragment_offset(&self) -> u16
[src]
pub fn is_last_fragment(&self) -> bool
[src]
Trait Implementations
impl<'p> Debug for FragmentPacket<'p>
[src]
impl<'p> Debug for FragmentPacket<'p>
[src]impl<'p> FromPacket for FragmentPacket<'p>
[src]
impl<'p> FromPacket for FragmentPacket<'p>
[src]impl<'a> Packet for FragmentPacket<'a>
[src]
impl<'a> Packet for FragmentPacket<'a>
[src]impl<'a> PacketSize for FragmentPacket<'a>
[src]
impl<'a> PacketSize for FragmentPacket<'a>
[src]pub fn packet_size(&self) -> usize
[src]
impl<'p> PartialEq<FragmentPacket<'p>> for FragmentPacket<'p>
[src]
impl<'p> PartialEq<FragmentPacket<'p>> for FragmentPacket<'p>
[src]pub fn eq(&self, other: &FragmentPacket<'p>) -> bool
[src]
pub fn ne(&self, other: &FragmentPacket<'p>) -> bool
[src]
impl<'p> StructuralPartialEq for FragmentPacket<'p>
[src]
impl<'p> StructuralPartialEq for FragmentPacket<'p>
[src]Auto Trait Implementations
impl<'p> RefUnwindSafe for FragmentPacket<'p>
impl<'p> RefUnwindSafe for FragmentPacket<'p>
impl<'p> Send for FragmentPacket<'p>
impl<'p> Send for FragmentPacket<'p>
impl<'p> Sync for FragmentPacket<'p>
impl<'p> Sync for FragmentPacket<'p>
impl<'p> Unpin for FragmentPacket<'p>
impl<'p> Unpin for FragmentPacket<'p>
impl<'p> UnwindSafe for FragmentPacket<'p>
impl<'p> UnwindSafe for FragmentPacket<'p>
Blanket Implementations
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,