[][src]Struct pcap_file::pcapng::SimplePacketBlock

pub struct SimplePacketBlock<'a> {
    pub original_len: u32,
    pub data: Cow<'a, [u8]>,
}

The Simple Packet Block (SPB) is a lightweight container for storing the packets coming from the network. Its presence is optional.

Fields

original_len: u32

Actual length of the packet when it was transmitted on the network.

data: Cow<'a, [u8]>

The data coming from the network, including link-layer headers.

Methods

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

pub fn into_owned(self) -> SimplePacketBlock<'static>[src]

Returns a version of self with all fields converted to owning versions.

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

pub fn from_slice<B: ByteOrder>(
    slice: &'a [u8]
) -> Result<(&'a [u8], Self), PcapError>
[src]

Trait Implementations

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

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

Auto Trait Implementations

impl<'a> Send for SimplePacketBlock<'a>

impl<'a> Sync for SimplePacketBlock<'a>

impl<'a> Unpin for SimplePacketBlock<'a>

impl<'a> UnwindSafe for SimplePacketBlock<'a>

impl<'a> RefUnwindSafe for SimplePacketBlock<'a>

Blanket Implementations

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.

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

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

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