pub struct PacketMetadata {
pub direction: Direction,
pub size: u16,
pub iat_ms: f64,
pub entropy: f32,
pub header_prefix: Vec<u8>,
pub timestamp_ns: u64,
}Expand description
Metadata extracted from a single packet (no payload — privacy-safe)
Fields§
§direction: DirectionPacket direction (uplink or downlink)
size: u16Total packet size in bytes
iat_ms: f64Inter-arrival time from previous packet in milliseconds
entropy: f32Shannon entropy of packet payload (0.0–8.0)
header_prefix: Vec<u8>First 16 bytes of the mask-dependent header
timestamp_ns: u64Monotonic timestamp in nanoseconds
Trait Implementations§
Source§impl Clone for PacketMetadata
impl Clone for PacketMetadata
Source§fn clone(&self) -> PacketMetadata
fn clone(&self) -> PacketMetadata
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 moreSource§impl Debug for PacketMetadata
impl Debug for PacketMetadata
Source§impl<'de> Deserialize<'de> for PacketMetadata
impl<'de> Deserialize<'de> for PacketMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PacketMetadata
impl RefUnwindSafe for PacketMetadata
impl Send for PacketMetadata
impl Sync for PacketMetadata
impl Unpin for PacketMetadata
impl UnsafeUnpin for PacketMetadata
impl UnwindSafe for PacketMetadata
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