[][src]Enum pcap_parser::Data

pub enum Data<'a> {
    Owned(Vec<u8>),
    Borrowed(&'a [u8]),
}

A container for owned or borrowed data

Variants

Owned(Vec<u8>)Borrowed(&'a [u8])

Methods

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

pub fn as_slice(&self) -> &[u8][src]

pub fn len(&self) -> usize[src]

Trait Implementations

impl<'a> AsRef<[u8]> for Data<'a>[src]

impl<'p> Index<usize> for Data<'p>[src]

type Output = u8

The returned type after indexing.

impl<'p> Index<Range<usize>> for Data<'p>[src]

type Output = [u8]

The returned type after indexing.

impl<'p> Index<RangeTo<usize>> for Data<'p>[src]

type Output = [u8]

The returned type after indexing.

impl<'p> Index<RangeFrom<usize>> for Data<'p>[src]

type Output = [u8]

The returned type after indexing.

impl<'p> Index<RangeFull> for Data<'p>[src]

type Output = [u8]

The returned type after indexing.

impl<'p> Index<RangeInclusive<usize>> for Data<'p>[src]

type Output = [u8]

The returned type after indexing.

impl<'p> Index<RangeToInclusive<usize>> for Data<'p>[src]

type Output = [u8]

The returned type after indexing.

Auto Trait Implementations

impl<'a> Send for Data<'a>

impl<'a> Unpin for Data<'a>

impl<'a> Sync for Data<'a>

impl<'a> UnwindSafe for Data<'a>

impl<'a> RefUnwindSafe for Data<'a>

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.

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]