Trait json_ld_syntax::Parse

source ·
pub trait Parse<M>: Sized {
    // Required method
    fn parse_spanned<C, F, E>(
        parser: &mut Parser<C, F, E>,
        context: Context
    ) -> Result<Meta<Self, Span>, Meta<Error<M, E>, M>>
       where C: Iterator<Item = Result<DecodedChar, E>>,
             F: FnMut(Span) -> M;

    // Provided methods
    fn parse_str<F>(
        content: &str,
        metadata_builder: F
    ) -> Result<Meta<Self, M>, Meta<Error<M, Infallible>, M>>
       where F: FnMut(Span) -> M { ... }
    fn parse_str_with<F>(
        content: &str,
        options: Options,
        metadata_builder: F
    ) -> Result<Meta<Self, M>, Meta<Error<M, Infallible>, M>>
       where F: FnMut(Span) -> M { ... }
    fn parse_infallible_utf8<C, F>(
        chars: C,
        metadata_builder: F
    ) -> Result<Meta<Self, M>, Meta<Error<M, Infallible>, M>>
       where C: Iterator<Item = char>,
             F: FnMut(Span) -> M { ... }
    fn parse_utf8_infallible_with<C, F>(
        chars: C,
        options: Options,
        metadata_builder: F
    ) -> Result<Meta<Self, M>, Meta<Error<M, Infallible>, M>>
       where C: Iterator<Item = char>,
             F: FnMut(Span) -> M { ... }
    fn parse_utf8<C, F, E>(
        chars: C,
        metadata_builder: F
    ) -> Result<Meta<Self, M>, Meta<Error<M, E>, M>>
       where C: Iterator<Item = Result<char, E>>,
             F: FnMut(Span) -> M { ... }
    fn parse_utf8_with<C, F, E>(
        chars: C,
        options: Options,
        metadata_builder: F
    ) -> Result<Meta<Self, M>, Meta<Error<M, E>, M>>
       where C: Iterator<Item = Result<char, E>>,
             F: FnMut(Span) -> M { ... }
    fn parse_infallible<C, F>(
        chars: C,
        metadata_builder: F
    ) -> Result<Meta<Self, M>, Meta<Error<M, Infallible>, M>>
       where C: Iterator<Item = DecodedChar>,
             F: FnMut(Span) -> M { ... }
    fn parse_infallible_with<C, F>(
        chars: C,
        options: Options,
        metadata_builder: F
    ) -> Result<Meta<Self, M>, Meta<Error<M, Infallible>, M>>
       where C: Iterator<Item = DecodedChar>,
             F: FnMut(Span) -> M { ... }
    fn parse<C, F, E>(
        chars: C,
        metadata_builder: F
    ) -> Result<Meta<Self, M>, Meta<Error<M, E>, M>>
       where C: Iterator<Item = Result<DecodedChar, E>>,
             F: FnMut(Span) -> M { ... }
    fn parse_with<C, F, E>(
        chars: C,
        options: Options,
        metadata_builder: F
    ) -> Result<Meta<Self, M>, Meta<Error<M, E>, M>>
       where C: Iterator<Item = Result<DecodedChar, E>>,
             F: FnMut(Span) -> M { ... }
    fn parse_in<C, F, E>(
        parser: &mut Parser<C, F, E>,
        context: Context
    ) -> Result<Meta<Self, M>, Meta<Error<M, E>, M>>
       where C: Iterator<Item = Result<DecodedChar, E>>,
             F: FnMut(Span) -> M { ... }
}

Required Methods§

source

fn parse_spanned<C, F, E>( parser: &mut Parser<C, F, E>, context: Context ) -> Result<Meta<Self, Span>, Meta<Error<M, E>, M>>where C: Iterator<Item = Result<DecodedChar, E>>, F: FnMut(Span) -> M,

Provided Methods§

source

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

source

fn parse_str_with<F>( content: &str, options: Options, metadata_builder: F ) -> Result<Meta<Self, M>, Meta<Error<M, Infallible>, M>>where F: FnMut(Span) -> M,

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

fn parse_in<C, F, E>( parser: &mut Parser<C, F, E>, context: Context ) -> Result<Meta<Self, M>, Meta<Error<M, E>, M>>where C: Iterator<Item = Result<DecodedChar, E>>, F: FnMut(Span) -> M,

Implementations on Foreign Types§

source§

impl<M> Parse<M> for ()

source§

fn parse_spanned<C, F, E>( parser: &mut Parser<C, F, E>, _context: Context ) -> Result<Meta<(), Span>, Meta<Error<M, E>, M>>where C: Iterator<Item = Result<DecodedChar, E>>, F: FnMut(Span) -> M,

source§

impl<M> Parse<M> for NumberBuf<SmallVec<[u8; 16]>>

source§

fn parse_spanned<C, F, E>( parser: &mut Parser<C, F, E>, context: Context ) -> Result<Meta<NumberBuf<SmallVec<[u8; 16]>>, Span>, Meta<Error<M, E>, M>>where C: Iterator<Item = Result<DecodedChar, E>>, F: FnMut(Span) -> M,

source§

impl<M, A> Parse<M> for SmallString<A>where A: Array<Item = u8>,

source§

fn parse_spanned<C, F, E>( parser: &mut Parser<C, F, E>, _context: Context ) -> Result<Meta<SmallString<A>, Span>, Meta<Error<M, E>, M>>where C: Iterator<Item = Result<DecodedChar, E>>, F: FnMut(Span) -> M,

source§

impl<M> Parse<M> for bool

source§

fn parse_spanned<C, F, E>( parser: &mut Parser<C, F, E>, _context: Context ) -> Result<Meta<bool, Span>, Meta<Error<M, E>, M>>where C: Iterator<Item = Result<DecodedChar, E>>, F: FnMut(Span) -> M,

Implementors§

source§

impl<M> Parse<M> for Value<M>