[−][src]Trait pear::Input
Associated Types
type Token: PartialEq + Copy
type Slice: PartialEq + Clone + Length
type InSlice: PartialEq + Clone + Length
type Many: Length
type Context: Display
Required methods
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
Provided methods
Loading content...Implementations on Foreign Types
impl<'a> Input for &'a str[src]
impl<'a> Input for &'a strtype Token = char
type InSlice = &'a str
type Slice = &'a str
type Many = Self::Slice
type Context = &'a str
fn peek(&mut self) -> Option<Self::Token>[src]
fn peek(&mut self) -> Option<Self::Token>fn peek_slice(&mut self, slice: Self::InSlice) -> Option<Self::Slice>[src]
fn peek_slice(&mut self, slice: Self::InSlice) -> Option<Self::Slice>fn skip_many<F>(&mut self, cond: F) -> usize where
F: FnMut(Self::Token) -> bool, [src]
fn skip_many<F>(&mut self, cond: F) -> usize where
F: FnMut(Self::Token) -> bool, fn take_many<F>(&mut self, cond: F) -> Self::Many where
F: FnMut(Self::Token) -> bool, [src]
fn take_many<F>(&mut self, cond: F) -> Self::Many where
F: FnMut(Self::Token) -> bool, fn advance(&mut self, count: usize)[src]
fn advance(&mut self, count: usize)fn is_empty(&mut self) -> bool[src]
fn is_empty(&mut self) -> boolfn context(&mut self) -> Option<Self::Context>[src]
fn context(&mut self) -> Option<Self::Context>impl<'a> Input for &'a [u8][src]
impl<'a> Input for &'a [u8]type Token = u8
type InSlice = &'a [u8]
type Slice = &'a [u8]
type Many = Self::Slice
type Context = &'a str
fn peek(&mut self) -> Option<Self::Token>[src]
fn peek(&mut self) -> Option<Self::Token>fn peek_slice(&mut self, slice: Self::InSlice) -> Option<Self::Slice>[src]
fn peek_slice(&mut self, slice: Self::InSlice) -> Option<Self::Slice>fn skip_many<F>(&mut self, cond: F) -> usize where
F: FnMut(Self::Token) -> bool, [src]
fn skip_many<F>(&mut self, cond: F) -> usize where
F: FnMut(Self::Token) -> bool, fn take_many<F>(&mut self, cond: F) -> Self::Many where
F: FnMut(Self::Token) -> bool, [src]
fn take_many<F>(&mut self, cond: F) -> Self::Many where
F: FnMut(Self::Token) -> bool, fn advance(&mut self, count: usize)[src]
fn advance(&mut self, count: usize)fn is_empty(&mut self) -> bool[src]
fn is_empty(&mut self) -> boolfn context(&mut self) -> Option<Self::Context>[src]
fn context(&mut self) -> Option<Self::Context>Implementors
impl<'a> Input for Text<'a>[src]
impl<'a> Input for Text<'a>type Token = char
type InSlice = &'a str
type Slice = &'a str
type Many = Self::Slice
type Context = Position<'a>
fn peek(&mut self) -> Option<Self::Token>[src]
fn peek(&mut self) -> Option<Self::Token>fn peek_slice(&mut self, slice: Self::InSlice) -> Option<Self::Slice>[src]
fn peek_slice(&mut self, slice: Self::InSlice) -> Option<Self::Slice>fn skip_many<F>(&mut self, cond: F) -> usize where
F: FnMut(Self::Token) -> bool, [src]
fn skip_many<F>(&mut self, cond: F) -> usize where
F: FnMut(Self::Token) -> bool, fn take_many<F>(&mut self, cond: F) -> Self::Many where
F: FnMut(Self::Token) -> bool, [src]
fn take_many<F>(&mut self, cond: F) -> Self::Many where
F: FnMut(Self::Token) -> bool, fn advance(&mut self, count: usize)[src]
fn advance(&mut self, count: usize)fn is_empty(&mut self) -> bool[src]
fn is_empty(&mut self) -> boolfn context(&mut self) -> Option<Position<'a>>[src]
fn context(&mut self) -> Option<Position<'a>>impl<'s> Input for StringFile<'s>[src]
impl<'s> Input for StringFile<'s>type Token = char
type InSlice = &'s str
type Slice = &'s str
type Many = String
type Context = &'s str
fn peek(&mut self) -> Option<Self::Token>[src]
fn peek(&mut self) -> Option<Self::Token>fn take_many<F: FnMut(Self::Token) -> bool>(&mut self, cond: F) -> Self::Many[src]
fn take_many<F: FnMut(Self::Token) -> bool>(&mut self, cond: F) -> Self::Manyfn skip_many<F: FnMut(Self::Token) -> bool>(&mut self, cond: F) -> usize[src]
fn skip_many<F: FnMut(Self::Token) -> bool>(&mut self, cond: F) -> usizefn peek_slice(&mut self, slice: Self::InSlice) -> Option<Self::Slice>[src]
fn peek_slice(&mut self, slice: Self::InSlice) -> Option<Self::Slice>fn advance(&mut self, count: usize)[src]
fn advance(&mut self, count: usize)fn is_empty(&mut self) -> bool[src]
fn is_empty(&mut self) -> boolfn context(&mut self) -> Option<Self::Context>[src]
fn context(&mut self) -> Option<Self::Context>