FoldBoundsParse

Trait FoldBoundsParse 

Source
pub trait FoldBoundsParse {
    // Required method
    fn fold_bounds<Stream, Context, Parser, Acc, Init, F>(
        &self,
        parser: &mut Parser,
        init: &mut Init,
        f: &mut F,
        stream: Stream,
    ) -> Parsed<Acc, Stream, Context>
       where Stream: Streaming,
             Context: Contexting<UtilsAtom<Stream>>,
             Parser: Parse<Stream, Context>,
             Init: FnMut() -> Acc,
             F: FnMut(Acc, Parser::Token) -> Acc;
}
Expand description

This trait must be implemented by Bounds you are using. As user you should not need to care about this except for few cases.

Required Methods§

Source

fn fold_bounds<Stream, Context, Parser, Acc, Init, F>( &self, parser: &mut Parser, init: &mut Init, f: &mut F, stream: Stream, ) -> Parsed<Acc, Stream, Context>
where Stream: Streaming, Context: Contexting<UtilsAtom<Stream>>, Parser: Parse<Stream, Context>, Init: FnMut() -> Acc, F: FnMut(Acc, Parser::Token) -> Acc,

This method allow to implement parse for every type that implement FoldBoundsParse.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl FoldBoundsParse for usize

Source§

fn fold_bounds<Stream, Context, Parser, Acc, Init, F>( &self, parser: &mut Parser, init: &mut Init, f: &mut F, stream: Stream, ) -> Parsed<Acc, Stream, Context>
where Stream: Clone + Eq, Context: Contexting<UtilsAtom<Stream>>, Parser: Parse<Stream, Context>, Init: FnMut() -> Acc, F: FnMut(Acc, Parser::Token) -> Acc,

Source§

impl FoldBoundsParse for Range<usize>

Source§

fn fold_bounds<Stream, Context, Parser, Acc, Init, F>( &self, parser: &mut Parser, init: &mut Init, f: &mut F, stream: Stream, ) -> Parsed<Acc, Stream, Context>
where Stream: Streaming, Context: Contexting<UtilsAtom<Stream>>, Parser: Parse<Stream, Context>, Init: FnMut() -> Acc, F: FnMut(Acc, Parser::Token) -> Acc,

Source§

impl FoldBoundsParse for RangeFrom<usize>

Source§

fn fold_bounds<Stream, Context, Parser, Acc, Init, F>( &self, parser: &mut Parser, init: &mut Init, f: &mut F, stream: Stream, ) -> Parsed<Acc, Stream, Context>
where Stream: Streaming, Context: Contexting<UtilsAtom<Stream>>, Parser: Parse<Stream, Context>, Init: FnMut() -> Acc, F: FnMut(Acc, Parser::Token) -> Acc,

Source§

impl FoldBoundsParse for RangeFull

Source§

fn fold_bounds<Stream, Context, Parser, Acc, Init, F>( &self, parser: &mut Parser, init: &mut Init, f: &mut F, stream: Stream, ) -> Parsed<Acc, Stream, Context>
where Stream: Streaming, Context: Contexting<UtilsAtom<Stream>>, Parser: Parse<Stream, Context>, Init: FnMut() -> Acc, F: FnMut(Acc, Parser::Token) -> Acc,

Source§

impl FoldBoundsParse for RangeInclusive<usize>

Source§

fn fold_bounds<Stream, Context, Parser, Acc, Init, F>( &self, parser: &mut Parser, init: &mut Init, f: &mut F, stream: Stream, ) -> Parsed<Acc, Stream, Context>
where Stream: Streaming, Context: Contexting<UtilsAtom<Stream>>, Parser: Parse<Stream, Context>, Init: FnMut() -> Acc, F: FnMut(Acc, Parser::Token) -> Acc,

Source§

impl FoldBoundsParse for RangeTo<usize>

Source§

fn fold_bounds<Stream, Context, Parser, Acc, Init, F>( &self, parser: &mut Parser, init: &mut Init, f: &mut F, stream: Stream, ) -> Parsed<Acc, Stream, Context>
where Stream: Streaming, Context: Contexting<UtilsAtom<Stream>>, Parser: Parse<Stream, Context>, Init: FnMut() -> Acc, F: FnMut(Acc, Parser::Token) -> Acc,

Source§

impl FoldBoundsParse for RangeToInclusive<usize>

Source§

fn fold_bounds<Stream, Context, Parser, Acc, Init, F>( &self, parser: &mut Parser, init: &mut Init, f: &mut F, stream: Stream, ) -> Parsed<Acc, Stream, Context>
where Stream: Streaming, Context: Contexting<UtilsAtom<Stream>>, Parser: Parse<Stream, Context>, Init: FnMut() -> Acc, F: FnMut(Acc, Parser::Token) -> Acc,

Implementors§