Struct rusty_parser::DynBoxChars
source · pub struct DynBoxChars<Output>where
Output: Tuple,{ /* private fields */ }Expand description
A Box<dyn Parser> wrapper for iterators of std::str::Chars.
This can take any parser with Output of Output.
Once you wrap the parser with this, you can only use input iterator of std::str::Chars.
Implementations§
source§impl<Output> DynBoxChars<Output>where
Output: Tuple,
impl<Output> DynBoxChars<Output>where
Output: Tuple,
Trait Implementations§
source§impl<Output> Deref for DynBoxChars<Output>where
Output: Tuple,
impl<Output> Deref for DynBoxChars<Output>where
Output: Tuple,
source§impl<Output> DerefMut for DynBoxChars<Output>where
Output: Tuple,
impl<Output> DerefMut for DynBoxChars<Output>where
Output: Tuple,
source§impl<Output> IntoParser for DynBoxChars<Output>where
Output: Tuple,
impl<Output> IntoParser for DynBoxChars<Output>where
Output: Tuple,
§type Into = DynBoxChars<Output>
type Into = DynBoxChars<Output>
Target Parser type
source§fn into_parser(self) -> Self::Into
fn into_parser(self) -> Self::Into
convert self to Parser Read more
source§fn seq<RhsParser: IntoParser>(
self,
rhs: RhsParser
) -> SeqParser<Self::Into, RhsParser::Into>where
Self: Sized,
fn seq<RhsParser: IntoParser>(
self,
rhs: RhsParser
) -> SeqParser<Self::Into, RhsParser::Into>where
Self: Sized,
concatenate two parser Read more
source§fn repeat<Idx, RangeType>(
self,
range_: RangeType
) -> RepeatParser<Self::Into, RangeType, Idx>where
Self: Sized,
RangeType: RangeBounds<Idx>,
Idx: PartialOrd + PartialEq + PartialOrd<i32> + PartialEq<i32>,
i32: PartialOrd + PartialEq + PartialOrd<Idx> + PartialEq<Idx>,
fn repeat<Idx, RangeType>(
self,
range_: RangeType
) -> RepeatParser<Self::Into, RangeType, Idx>where
Self: Sized,
RangeType: RangeBounds<Idx>,
Idx: PartialOrd + PartialEq + PartialOrd<i32> + PartialEq<i32>,
i32: PartialOrd + PartialEq + PartialOrd<Idx> + PartialEq<Idx>,
repeat parser multiple times. This tries to match as long as possible. Read more
source§fn or<RhsParser: IntoParser>(
self,
rhs: RhsParser
) -> OrParser<Self::Into, RhsParser::Into>where
Self: Sized,
fn or<RhsParser: IntoParser>(
self,
rhs: RhsParser
) -> OrParser<Self::Into, RhsParser::Into>where
Self: Sized,
or combinator for two parsers Read more
source§fn map<ClosureType, ClosureInput, ClosureOutput>(
self,
callback: ClosureType
) -> MapParser<Self::Into, ClosureType, ClosureInput, ClosureOutput>
fn map<ClosureType, ClosureInput, ClosureOutput>( self, callback: ClosureType ) -> MapParser<Self::Into, ClosureType, ClosureInput, ClosureOutput>
Map parser’s Output to new value Read more
source§fn void(self) -> VoidParser<Self::Into>where
Self: Sized,
fn void(self) -> VoidParser<Self::Into>where
Self: Sized,
Change Parser’s Output to ().
This internally call match_pattern() instead of parse() Read more
source§fn optional(self) -> OptionalParser<Self::Into>where
Self: Sized,
fn optional(self) -> OptionalParser<Self::Into>where
Self: Sized,
This parser always success whether the input is matched or not. Read more
source§fn optional_or<Output: Clone + Tuple>(
self,
output: Output
) -> OptionalOrParser<Self::Into, Output>where
Self: Sized,
fn optional_or<Output: Clone + Tuple>(
self,
output: Output
) -> OptionalOrParser<Self::Into, Output>where
Self: Sized,
This parser always success whether the input is matched or not. Read more
source§fn refcell(self) -> RefCelledParser<Self::Into>where
Self: Sized,
fn refcell(self) -> RefCelledParser<Self::Into>where
Self: Sized,
create RefCell<Parser> wrapper. Read more
source§fn box_slice<Output, T>(self) -> DynBoxSlice<Output, T>
fn box_slice<Output, T>(self) -> DynBoxSlice<Output, T>
create a Box<dyn Parser> wrapper for iterators of
std::iter::Copied<std::slice::Iter>. Read moresource§fn not<RhsParser: IntoParser>(
self,
rhs: RhsParser
) -> NotParser<Self::Into, RhsParser::Into>where
Self: Sized,
fn not<RhsParser: IntoParser>(
self,
rhs: RhsParser
) -> NotParser<Self::Into, RhsParser::Into>where
Self: Sized,
Match for parser1 parser2, parser1 must success and parser2 must fail. Read more
source§fn output<Output: Tuple + Clone>(
self,
output: Output
) -> OutputParser<Self::Into, Output>where
Self: Sized,
fn output<Output: Tuple + Clone>(
self,
output: Output
) -> OutputParser<Self::Into, Output>where
Self: Sized,
Change Parser’s Output to output. Read more
Auto Trait Implementations§
impl<Output> Freeze for DynBoxChars<Output>
impl<Output> !RefUnwindSafe for DynBoxChars<Output>
impl<Output> !Send for DynBoxChars<Output>
impl<Output> !Sync for DynBoxChars<Output>
impl<Output> Unpin for DynBoxChars<Output>
impl<Output> !UnwindSafe for DynBoxChars<Output>
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