pub struct Ipv6Packet<'a> { /* private fields */ }Expand description
Zero-copy IPv6 packet parser.
Implementations§
Source§impl<'a> Ipv6Packet<'a>
impl<'a> Ipv6Packet<'a>
pub fn new(buf: &'a [u8]) -> Option<Self>
pub fn version(&self) -> u8
pub fn traffic_class(&self) -> u8
pub fn flow_label(&self) -> u32
pub fn payload_length(&self) -> u16
pub fn next_header(&self) -> IpProtocol
pub fn hop_limit(&self) -> u8
pub fn source(&self) -> Ipv6Addr
pub fn destination(&self) -> Ipv6Addr
Sourcepub fn extension_headers(&self) -> Ipv6ExtensionHeadersIter<'a> ⓘ
pub fn extension_headers(&self) -> Ipv6ExtensionHeadersIter<'a> ⓘ
Iterate over IPv6 extension headers.
Sourcepub fn final_protocol(&self) -> IpProtocol
pub fn final_protocol(&self) -> IpProtocol
The final upper-layer protocol after skipping all extension headers.
Trait Implementations§
Source§impl<'a> Clone for Ipv6Packet<'a>
impl<'a> Clone for Ipv6Packet<'a>
Source§fn clone(&self) -> Ipv6Packet<'a>
fn clone(&self) -> Ipv6Packet<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for Ipv6Packet<'a>
impl<'a> RefUnwindSafe for Ipv6Packet<'a>
impl<'a> Send for Ipv6Packet<'a>
impl<'a> Sync for Ipv6Packet<'a>
impl<'a> Unpin for Ipv6Packet<'a>
impl<'a> UnsafeUnpin for Ipv6Packet<'a>
impl<'a> UnwindSafe for Ipv6Packet<'a>
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