Struct ntap_core::net::packet::PacketFrame
source · pub struct PacketFrame {
pub capture_no: usize,
pub if_index: u32,
pub if_name: String,
pub datalink: Option<DatalinkLayer>,
pub ip: Option<IpLayer>,
pub transport: Option<TransportLayer>,
pub packet_len: usize,
pub timestamp: String,
}
Fields§
§capture_no: usize
Capture number.
if_index: u32
interface index
if_name: String
interface name.
datalink: Option<DatalinkLayer>
The datalink layer.
ip: Option<IpLayer>
The IP layer.
transport: Option<TransportLayer>
The transport layer.
packet_len: usize
Rest of the packet that could not be parsed as a header. (Usually payload) Packet length.
timestamp: String
Packet arrival time. RFC3339 format.
Implementations§
source§impl PacketFrame
impl PacketFrame
pub fn new() -> Self
pub fn from_nex_frame( capture_no: usize, if_index: u32, if_name: String, frame: Frame, ) -> PacketFrame
Trait Implementations§
source§impl Clone for PacketFrame
impl Clone for PacketFrame
source§fn clone(&self) -> PacketFrame
fn clone(&self) -> PacketFrame
Returns a copy of the value. Read more
1.0.0 · 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 PacketFrame
impl Debug for PacketFrame
source§impl<'de> Deserialize<'de> for PacketFrame
impl<'de> Deserialize<'de> for PacketFrame
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 PacketFrame
impl RefUnwindSafe for PacketFrame
impl Send for PacketFrame
impl Sync for PacketFrame
impl Unpin for PacketFrame
impl UnwindSafe for PacketFrame
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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