Skip to main content

Parse

Trait Parse 

Source
pub trait Parse<M>: Sized {
    // Required method
    fn parse_from<L, F>(
        parser: &mut Parser<L, F>,
        token: Meta<Token, Span>,
    ) -> Result<Meta<Self, M>, MetaError<L::Error, M>>
       where L: Tokens,
             F: FnMut(Span) -> M;

    // Provided methods
    fn parse_with<L, F>(
        parser: &mut Parser<L, F>,
    ) -> Result<Meta<Self, M>, MetaError<L::Error, M>>
       where L: Tokens,
             F: FnMut(Span) -> M { ... }
    fn parse_empty<L>(meta: M) -> Result<Meta<Self, M>, MetaError<L::Error, M>>
       where L: Tokens { ... }
    fn parse<C, F, E>(
        chars: C,
        metadata_builder: F,
    ) -> Result<Meta<Self, M>, MetaError<Error<E>, M>>
       where C: Iterator<Item = Result<DecodedChar, E>>,
             F: FnMut(Span) -> M { ... }
    fn parse_infallible<C, F>(
        chars: C,
        metadata_builder: F,
    ) -> Result<Meta<Self, M>, MetaError<Error, M>>
       where C: Iterator<Item = DecodedChar>,
             F: FnMut(Span) -> M { ... }
    fn parse_utf8<C, F, E>(
        chars: C,
        metadata_builder: F,
    ) -> Result<Meta<Self, M>, MetaError<Error<E>, M>>
       where C: Iterator<Item = Result<char, E>>,
             F: FnMut(Span) -> M { ... }
    fn parse_utf8_infallible<C, F>(
        chars: C,
        metadata_builder: F,
    ) -> Result<Meta<Self, M>, MetaError<Error, M>>
       where C: Iterator<Item = char>,
             F: FnMut(Span) -> M { ... }
    fn parse_utf16<C, F, E>(
        chars: C,
        metadata_builder: F,
    ) -> Result<Meta<Self, M>, MetaError<Error<E>, M>>
       where C: Iterator<Item = Result<char, E>>,
             F: FnMut(Span) -> M { ... }
    fn parse_utf16_infallible<C, F>(
        chars: C,
        metadata_builder: F,
    ) -> Result<Meta<Self, M>, MetaError<Error, M>>
       where C: Iterator<Item = char>,
             F: FnMut(Span) -> M { ... }
    fn parse_str<F>(
        string: &str,
        metadata_builder: F,
    ) -> Result<Meta<Self, M>, MetaError<Error, M>>
       where F: FnMut(Span) -> M { ... }
}

Required Methods§

Source

fn parse_from<L, F>( parser: &mut Parser<L, F>, token: Meta<Token, Span>, ) -> Result<Meta<Self, M>, MetaError<L::Error, M>>
where L: Tokens, F: FnMut(Span) -> M,

Provided Methods§

Source

fn parse_with<L, F>( parser: &mut Parser<L, F>, ) -> Result<Meta<Self, M>, MetaError<L::Error, M>>
where L: Tokens, F: FnMut(Span) -> M,

Source

fn parse_empty<L>(meta: M) -> Result<Meta<Self, M>, MetaError<L::Error, M>>
where L: Tokens,

Source

fn parse<C, F, E>( chars: C, metadata_builder: F, ) -> Result<Meta<Self, M>, MetaError<Error<E>, M>>
where C: Iterator<Item = Result<DecodedChar, E>>, F: FnMut(Span) -> M,

Source

fn parse_infallible<C, F>( chars: C, metadata_builder: F, ) -> Result<Meta<Self, M>, MetaError<Error, M>>
where C: Iterator<Item = DecodedChar>, F: FnMut(Span) -> M,

Source

fn parse_utf8<C, F, E>( chars: C, metadata_builder: F, ) -> Result<Meta<Self, M>, MetaError<Error<E>, M>>
where C: Iterator<Item = Result<char, E>>, F: FnMut(Span) -> M,

Source

fn parse_utf8_infallible<C, F>( chars: C, metadata_builder: F, ) -> Result<Meta<Self, M>, MetaError<Error, M>>
where C: Iterator<Item = char>, F: FnMut(Span) -> M,

Source

fn parse_utf16<C, F, E>( chars: C, metadata_builder: F, ) -> Result<Meta<Self, M>, MetaError<Error<E>, M>>
where C: Iterator<Item = Result<char, E>>, F: FnMut(Span) -> M,

Source

fn parse_utf16_infallible<C, F>( chars: C, metadata_builder: F, ) -> Result<Meta<Self, M>, MetaError<Error, M>>
where C: Iterator<Item = char>, F: FnMut(Span) -> M,

Source

fn parse_str<F>( string: &str, metadata_builder: F, ) -> Result<Meta<Self, M>, MetaError<Error, M>>
where F: FnMut(Span) -> M,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<M> Parse<M> for Vec<Meta<PredicateObjects<M>, M>>

Source§

fn parse_from<L, F>( parser: &mut Parser<L, F>, Meta: Meta<Token, Span>, ) -> Result<Meta<Self, M>, MetaError<L::Error, M>>
where L: Tokens, F: FnMut(Span) -> M,

Implementors§

Source§

impl<M> Parse<M> for Directive<M>

Source§

impl<M> Parse<M> for Iri<M>

Source§

impl<M> Parse<M> for Literal<M>

Source§

impl<M> Parse<M> for Object<M>

Source§

impl<M> Parse<M> for Statement<M>

Source§

impl<M> Parse<M> for Subject<M>

Source§

impl<M> Parse<M> for Verb<M>

Source§

impl<M> Parse<M> for Collection<M>

Source§

impl<M> Parse<M> for Document<M>

Source§

impl<M> Parse<M> for Objects<M>

Source§

impl<M> Parse<M> for PredicateObjects<M>

Source§

impl<M> Parse<M> for Triples<M>