Enum nom::Needed[][src]

pub enum Needed {
    Unknown,
    Size(usize),
}

Contains information on needed data if a parser returned Incomplete

Variants

Unknown

needs more data, but we do not know how much

Size(usize)

contains the required data size

Implementations

impl Needed[src]

pub fn is_known(&self) -> bool[src]

indicates if we know how many bytes we need

pub fn map<F: Fn(usize) -> usize>(self, f: F) -> Needed[src]

Maps a Needed to Needed by applying a function to a contained Size value.

Trait Implementations

impl Clone for Needed[src]

impl Copy for Needed[src]

impl Debug for Needed[src]

impl Eq for Needed[src]

impl PartialEq<Needed> for Needed[src]

impl StructuralEq for Needed[src]

impl StructuralPartialEq for Needed[src]

Auto Trait Implementations

impl RefUnwindSafe for Needed

impl Send for Needed

impl Sync for Needed

impl Unpin for Needed

impl UnwindSafe for Needed

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, 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.