[−][src]Struct parze::Declaration
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]
pub fn link(&self) -> Parser<'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]
self,
parser: Parser<'a, T, O, E, impl ParseFn<T, O, E>>
) -> Parser<'a, T, O, E>
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]
T: ?Sized,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,