pub struct StringParser(/* private fields */);
Expand description
StringParser consumes a fixed string.
Implementations§
Source§impl StringParser
impl StringParser
pub fn new<S: AsRef<str>>(s: S) -> StringParser
Trait Implementations§
Source§impl Clone for StringParser
impl Clone for StringParser
Source§fn clone(&self) -> StringParser
fn clone(&self) -> StringParser
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for StringParser
impl Debug for StringParser
Source§impl Parser for StringParser
impl Parser for StringParser
type Result = String
Source§fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>,
) -> ParseResult<Self::Result>
fn parse( &mut self, st: &mut ParseState<impl Iterator<Item = char>>, ) -> ParseResult<Self::Result>
parse consumes input from
st
and returns a result or an error. Read moreSource§impl PartialEq for StringParser
impl PartialEq for StringParser
impl StructuralPartialEq for StringParser
Auto Trait Implementations§
impl Freeze for StringParser
impl RefUnwindSafe for StringParser
impl Send for StringParser
impl Sync for StringParser
impl Unpin for StringParser
impl UnwindSafe for StringParser
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