[][src]Trait moore::grind::Grinder

pub trait Grinder {
    type Item: Chisel;
    type Error;
    pub fn next(&mut self) -> Self::Item;
pub fn emit(&mut self, err: Self::Error); pub fn vent<F, E>(self, f: F) -> Vent<Self, F, E>
    where
        F: Fn(E)
, { ... }
pub fn unwrap(self) -> Unwrap<Self> { ... }
pub fn map_err<F, E>(self, f: F) -> MapErrGrinder<Self, F, E>
    where
        F: Fn(E) -> Self::Error
, { ... }
pub fn peekable(self) -> Peekable<Self> { ... }
pub fn lookaheadable(self) -> Lookahead<Self> { ... }
pub fn filter<F>(self, f: F) -> Filter<Self, F>
    where
        F: Fn(&<Self::Item as Chisel>::Value) -> bool
, { ... } }

Associated Types

Loading content...

Required methods

pub fn next(&mut self) -> Self::Item[src]

pub fn emit(&mut self, err: Self::Error)[src]

Loading content...

Provided methods

pub fn vent<F, E>(self, f: F) -> Vent<Self, F, E> where
    F: Fn(E), 
[src]

pub fn unwrap(self) -> Unwrap<Self>[src]

pub fn map_err<F, E>(self, f: F) -> MapErrGrinder<Self, F, E> where
    F: Fn(E) -> Self::Error
[src]

pub fn peekable(self) -> Peekable<Self>[src]

pub fn lookaheadable(self) -> Lookahead<Self>[src]

pub fn filter<F>(self, f: F) -> Filter<Self, F> where
    F: Fn(&<Self::Item as Chisel>::Value) -> bool
[src]

Loading content...

Trait Implementations

impl<I, C, E> Iterator for dyn Grinder<Error = E, Item = C> + 'static where
    C: Chisel<Value = I>, 
[src]

type Item = I

The type of the elements being iterated over.

Implementations on Foreign Types

impl<T> Grinder for Tokenizer<T> where
    T: Grinder<Item = Option<Spanned<Bundle>>, Error = DiagBuilder2>, 

type Item = Option<Spanned<Token>>

type Error = DiagBuilder2

impl<T> Grinder for Categorizer<T> where
    T: Grinder<Item = Option<(usize, char, u8)>, Error = DiagBuilder2>, 

type Item = Option<(usize, char, u8, Category)>

type Error = DiagBuilder2

impl<T> Grinder for Bundler<T> where
    T: Grinder<Item = Option<(usize, char, u8, Category)>, Error = DiagBuilder2>, 

type Item = Option<Spanned<Bundle>>

type Error = DiagBuilder2

impl<T> Grinder for Lexer<T> where
    T: Grinder<Item = Option<u8>, Error = DiagBuilder2>, 

type Item = Option<Spanned<Token>>

type Error = DiagBuilder2

Loading content...

Implementors

impl<I> Grinder for Iter<I> where
    I: Iterator
[src]

type Item = Option<<I as Iterator>::Item>

type Error = ()

impl<I, E, C, T> Grinder for Unwrap<T> where
    C: Chisel<Value = Result<I, E>>,
    T: Grinder<Item = C, Error = E>, 
[src]

type Item = Option<I>

type Error = <T as Grinder>::Error

impl<R> Grinder for Read<R> where
    R: Read
[src]

type Item = Option<Result<u8, Error>>

type Error = ()

impl<T> Grinder for Lookahead<T> where
    T: Grinder
[src]

type Item = <T as Grinder>::Item

type Error = <T as Grinder>::Error

impl<T> Grinder for Peekable<T> where
    T: Grinder
[src]

type Item = <T as Grinder>::Item

type Error = <T as Grinder>::Error

impl<T> Grinder for Utf8<T> where
    T: Grinder<Item = Option<u8>>, 
[src]

type Item = Option<(usize, char, u8)>

type Error = <T as Grinder>::Error

impl<T, E, F> Grinder for MapErrGrinder<T, F, E> where
    T: Grinder,
    F: Fn(E) -> <T as Grinder>::Error
[src]

type Item = <T as Grinder>::Item

type Error = E

impl<T, E, F> Grinder for Vent<T, F, E> where
    T: Grinder,
    F: Fn(E), 
[src]

type Item = <T as Grinder>::Item

type Error = E

impl<T, F> Grinder for Filter<T, F> where
    T: Grinder,
    F: Fn(&<<T as Grinder>::Item as Chisel>::Value) -> bool
[src]

type Item = <T as Grinder>::Item

type Error = <T as Grinder>::Error

Loading content...