pub struct IgmpPacket<'a> { /* private fields */ }Expand description
Zero-copy IGMP packet parser.
Implementations§
Source§impl<'a> IgmpPacket<'a>
impl<'a> IgmpPacket<'a>
pub fn new(buf: &'a [u8]) -> Option<Self>
pub fn type_(&self) -> u8
pub fn max_response(&self) -> u8
pub fn checksum(&self) -> u16
pub fn group_address(&self) -> Ipv4Addr
pub fn payload(&self) -> &'a [u8]
pub fn verify_checksum(&self) -> bool
pub fn message(&self) -> IgmpMessage<'a>
Trait Implementations§
Source§impl<'a> Clone for IgmpPacket<'a>
impl<'a> Clone for IgmpPacket<'a>
Source§fn clone(&self) -> IgmpPacket<'a>
fn clone(&self) -> IgmpPacket<'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 IgmpPacket<'a>
impl<'a> RefUnwindSafe for IgmpPacket<'a>
impl<'a> Send for IgmpPacket<'a>
impl<'a> Sync for IgmpPacket<'a>
impl<'a> Unpin for IgmpPacket<'a>
impl<'a> UnsafeUnpin for IgmpPacket<'a>
impl<'a> UnwindSafe for IgmpPacket<'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