pub struct Ipv6Packet {
pub header: Ipv6Header,
pub extensions: Vec<Ipv6ExtensionHeader>,
pub payload: Bytes,
}Fields§
§header: Ipv6Header§extensions: Vec<Ipv6ExtensionHeader>§payload: BytesImplementations§
Source§impl Ipv6Packet
impl Ipv6Packet
pub fn total_len(&self) -> usize
pub fn get_extension( &self, kind: ExtensionHeaderType, ) -> Option<&Ipv6ExtensionHeader>
Trait Implementations§
Source§impl Clone for Ipv6Packet
impl Clone for Ipv6Packet
Source§fn clone(&self) -> Ipv6Packet
fn clone(&self) -> Ipv6Packet
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Ipv6Packet
impl Debug for Ipv6Packet
Source§impl Packet for Ipv6Packet
impl Packet for Ipv6Packet
type Header = Ipv6Header
Source§fn from_bytes(bytes: Bytes) -> Option<Self>
fn from_bytes(bytes: Bytes) -> Option<Self>
Parse from raw bytes. (with ownership)
Source§fn header_len(&self) -> usize
fn header_len(&self) -> usize
Get the length of the header.
Source§fn payload_len(&self) -> usize
fn payload_len(&self) -> usize
Get the length of the payload.
fn into_parts(self) -> (Self::Header, Bytes)
Source§fn to_bytes_mut(&self) -> BytesMut
fn to_bytes_mut(&self) -> BytesMut
Convert the packet to a mutable byte buffer.
Source§fn header_mut(&self) -> BytesMut
fn header_mut(&self) -> BytesMut
Get a mutable byte buffer for the header.
Source§fn payload_mut(&self) -> BytesMut
fn payload_mut(&self) -> BytesMut
Get a mutable byte buffer for the payload.
Source§impl PartialEq for Ipv6Packet
impl PartialEq for Ipv6Packet
impl Eq for Ipv6Packet
impl StructuralPartialEq for Ipv6Packet
Auto Trait Implementations§
impl !Freeze for Ipv6Packet
impl RefUnwindSafe for Ipv6Packet
impl Send for Ipv6Packet
impl Sync for Ipv6Packet
impl Unpin for Ipv6Packet
impl UnwindSafe for Ipv6Packet
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