pub struct Packet { /* private fields */ }
Implementations§
Source§impl Packet
impl Packet
pub fn into_data(self) -> Vec<u8> ⓘ
pub fn into_pcap_record<T: ByteOrder>(self) -> Result<Vec<u8>, Error>
pub fn as_pcap_record<T: ByteOrder>(&self) -> Result<Vec<u8>, Error>
pub fn write_pcap_record<B: ByteOrder, C: WriteBytesExt>( &self, cursor: &mut C, ) -> Result<(), Error>
pub fn timestamp(&self) -> &SystemTime
pub fn data(&self) -> &[u8] ⓘ
pub fn actual_length(&self) -> u32
pub fn original_length(&self) -> u32
pub fn new( timestamp: SystemTime, actual_length: u32, original_length: u32, data: Vec<u8>, ) -> Packet
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Packet
impl RefUnwindSafe for Packet
impl Send for Packet
impl Sync for Packet
impl Unpin for Packet
impl UnwindSafe for Packet
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