pub struct CharacterParser { /* private fields */ }
Implementations§
Trait Implementations§
Source§impl Debug for CharacterParser
impl Debug for CharacterParser
Source§impl<'a> Parser<'a> for CharacterParser
impl<'a> Parser<'a> for CharacterParser
type Error = CharacterParserError
type Output = &'a str
type Requirement = char
type RequirementContext = ()
fn parse( &self, src: &'a str, pos: &mut usize, ) -> Result<Self::Output, Self::Error>
fn requirement(&self, _: Option<&Self::RequirementContext>) -> Self::Requirement
fn skip(&self, src: &'a str, pos: &mut usize) -> Result<(), Self::Error>
fn and_then<P>(self, next: P) -> SequenceParser<'a, Self, P>
fn or<P>(self, next: P) -> OrderParser<'a, Self, P>
fn map<R>(self, mapper: &'a dyn Fn(Self::Output) -> R) -> MapParser<'a, Self, R>where
Self: Sized,
fn and_gen<P>( self, generator: &'a dyn Fn(&Self::Output) -> P, ) -> GenParser<'a, Self, P>
fn repeat(self, min: usize, max: usize) -> RepetitionParser<'a, Self>where
Self: Sized,
fn zero_or_more(self) -> RepetitionParser<'a, Self>where
Self: Sized,
fn one_or_more(self) -> RepetitionParser<'a, Self>where
Self: Sized,
fn stringify(self) -> StringifyParser<'a, Self>where
Self: Sized,
Auto Trait Implementations§
impl Freeze for CharacterParser
impl RefUnwindSafe for CharacterParser
impl Send for CharacterParser
impl Sync for CharacterParser
impl Unpin for CharacterParser
impl UnwindSafe for CharacterParser
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more