pub struct Packet<'a> {
pub timestamp: Option<Duration>,
pub orig_len: u32,
pub data: Cow<'a, [u8]>,
pub datalink: DataLink,
}Expand description
Commen packet.
The payload can be owned or borrowed.
Fields§
§timestamp: Option<Duration>Timestamp EPOCH of the packet with a nanosecond resolution
orig_len: u32Original length of the packet when captured on the wire
data: Cow<'a, [u8]>Payload, owned or borrowed, of the packet
datalink: DataLinkDataLink of current packet
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Packet<'a>
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