[][src]Struct net_parser_rs::record::PcapRecord

pub struct PcapRecord<'a> {
    pub timestamp: SystemTime,
    pub actual_length: u32,
    pub original_length: u32,
    pub payload: &'a [u8],
}

Pcap record associated with a libpcap capture

Fields

timestamp: SystemTimeactual_length: u32original_length: u32payload: &'a [u8]

Implementations

impl<'a> PcapRecord<'a>[src]

pub fn convert_packet_time(ts_seconds: u32, ts_microseconds: u32) -> SystemTime[src]

Convert a packet time (seconds and partial second microseconds) to a system time (offset from epoch)

pub fn new(
    timestamp: SystemTime,
    actual_length: u32,
    original_length: u32,
    payload: &'a [u8]
) -> PcapRecord<'a>
[src]

pub fn parse<'b>(
    input: &'b [u8],
    endianness: Endianness
) -> Result<(&'b [u8], PcapRecord<'b>), Error>
[src]

Trait Implementations

impl<'a> Clone for PcapRecord<'a>[src]

impl<'a> Copy for PcapRecord<'a>[src]

impl<'a> Debug for PcapRecord<'a>[src]

impl<'a> Default for PcapRecord<'a>[src]

impl<'a> Display for PcapRecord<'a>[src]

impl<'a> FlowExtraction for PcapRecord<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for PcapRecord<'a>

impl<'a> Send for PcapRecord<'a>

impl<'a> Sync for PcapRecord<'a>

impl<'a> Unpin for PcapRecord<'a>

impl<'a> UnwindSafe for PcapRecord<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.