Trait pear::Input

source ·
pub trait Input: Sized {
    type Token: PartialEq + Copy;
    type Slice: PartialEq + Clone + Length;
    type InSlice: PartialEq + Clone + Length;
    type Many: Length;
    type Context: Display;

    fn peek(&mut self) -> Option<Self::Token>;
    fn peek_slice(&mut self, _: Self::InSlice) -> Option<Self::Slice>;
    fn advance(&mut self, _: usize);
    fn is_empty(&mut self) -> bool;
    fn take_many<F: FnMut(Self::Token) -> bool>(&mut self, cond: F) -> Self::Many;
    fn skip_many<F: FnMut(Self::Token) -> bool>(&mut self, cond: F) -> usize;

    fn context(&mut self) -> Option<Self::Context> { ... }
}

Required Associated Types§

Required Methods§

Provided Methods§

Implementations on Foreign Types§

Implementors§