Struct netsim_embed_core::Packet
source · pub struct Packet<'a> { /* private fields */ }
Implementations§
source§impl<'a> Packet<'a>
impl<'a> Packet<'a>
pub fn new(bytes: &'a mut [u8]) -> Option<Self>
pub fn get_source(&self) -> SocketAddrV4
pub fn get_destination(&self) -> SocketAddrV4
pub fn get_ttl(&self) -> u8
pub fn protocol(&self) -> Protocol
pub fn set_source(&mut self, addr: SocketAddrV4)
pub fn set_destination(&mut self, addr: SocketAddrV4)
pub fn set_ttl(&mut self, ttl: u8)
pub fn set_checksum(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Packet<'a>
impl<'a> Send for Packet<'a>
impl<'a> Sync for Packet<'a>
impl<'a> Unpin for Packet<'a>
impl<'a> !UnwindSafe for Packet<'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