[][src]Struct parze::Declaration

pub struct Declaration<'a, T: Clone + 'a, O: 'a, E: ParseError<T> = DefaultParseError<T>> { /* fields omitted */ }

A type used to separate the declaration and definition of a parser such that it may be defined in terms of itself.

This type is the primary route through which recursive parsers are defined, although call(f) may also be used.

Methods

impl<'a, T: Clone + 'a, O: 'a, E: ParseError<T> + 'a> Declaration<'a, T, O, E>[src]

Create a parser that is linked to this declaration. If the resultant parser is used before this declaration is defined (see .define) then a panic will occur.

pub fn define(
    self,
    parser: Parser<'a, T, O, E, impl ParseFn<T, O, E>>
) -> Parser<'a, T, O, E>
[src]

Provider a parser definition for this declaration, thereby sealing it as a well-defined parser.

Trait Implementations

impl<'a, T: Clone + 'a, O: 'a, E: ParseError<T>> Default for Declaration<'a, T, O, E>[src]

Auto Trait Implementations

impl<'a, T, O, E = DefaultParseError<T>> !Send for Declaration<'a, T, O, E>

impl<'a, T, O, E = DefaultParseError<T>> !Sync for Declaration<'a, T, O, E>

impl<'a, T, O, E> Unpin for Declaration<'a, T, O, E>

impl<'a, T, O, E = DefaultParseError<T>> !UnwindSafe for Declaration<'a, T, O, E>

impl<'a, T, O, E = DefaultParseError<T>> !RefUnwindSafe for Declaration<'a, T, O, E>

Blanket Implementations

impl<'a, T> Captures<'a> for T where
    T: ?Sized
[src]

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

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

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

type Error = !

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]