pub struct PacketIndex {
pub timestamp_ns: u64,
pub byte_offset: u64,
pub caplen: u32,
}Expand description
Minimal per-packet record built during the first pass.
| Field | Size | Description |
|---|---|---|
timestamp_ns | 8 B | Nanoseconds since the Unix epoch |
byte_offset | 8 B | File position of the 16-byte record header |
caplen | 4 B | Captured packet length (payload only) |
Total: 20 bytes per packet.
Fields§
§timestamp_ns: u64Packet timestamp in nanoseconds since the Unix epoch.
byte_offset: u64Byte offset of the 16-byte PCAP record header in the source file.
caplen: u32Captured packet length (bytes of payload, not including the record header).
Implementations§
Trait Implementations§
Source§impl Clone for PacketIndex
impl Clone for PacketIndex
Source§fn clone(&self) -> PacketIndex
fn clone(&self) -> PacketIndex
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 moreimpl Copy for PacketIndex
Source§impl Debug for PacketIndex
impl Debug for PacketIndex
impl Eq for PacketIndex
Source§impl PartialEq for PacketIndex
impl PartialEq for PacketIndex
Source§fn eq(&self, other: &PacketIndex) -> bool
fn eq(&self, other: &PacketIndex) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PacketIndex
Auto Trait Implementations§
impl Freeze for PacketIndex
impl RefUnwindSafe for PacketIndex
impl Send for PacketIndex
impl Sync for PacketIndex
impl Unpin for PacketIndex
impl UnsafeUnpin for PacketIndex
impl UnwindSafe for PacketIndex
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more