Struct parser_fuck::combinators::Dyn
source · pub struct Dyn<I: TimeTravel, O = ()> { /* private fields */ }
Expand description
Wrap to dynamic
Implementations§
Trait Implementations§
source§impl<I: TimeTravel, O> Debug for Dyn<I, O>
impl<I: TimeTravel, O> Debug for Dyn<I, O>
source§impl<I: TimeTravel, O> Parser<I> for Dyn<I, O>
impl<I: TimeTravel, O> Parser<I> for Dyn<I, O>
type Output = O
source§fn map<U, F>(self, f: F) -> Map<Self, I, F>where
Self: Sized,
F: FnMut(Self::Output) -> U,
fn map<U, F>(self, f: F) -> Map<Self, I, F>where Self: Sized, F: FnMut(Self::Output) -> U,
Map a
Parser<Output = T>
to Parser<Output = U>
by applying a function to a contained valuesource§fn and<B>(self, b: B) -> And<Self, B, I>where
Self: Sized,
B: Parser<I>,
fn and<B>(self, b: B) -> And<Self, B, I>where Self: Sized, B: Parser<I>,
Only pass if both subparsers pass
source§fn or<B>(self, b: B) -> Or<Self, B, I>where
Self: Sized,
B: Parser<I, Output = Self::Output>,
fn or<B>(self, b: B) -> Or<Self, B, I>where Self: Sized, B: Parser<I, Output = Self::Output>,
Pass when any subparser passes
source§fn many_min_max(self, min: usize, max: usize) -> Many<Self, I>where
Self: Sized,
fn many_min_max(self, min: usize, max: usize) -> Many<Self, I>where Self: Sized,
{n,m}, >= n && <= m
source§fn and_then<U, F>(self, f: F) -> AndThen<Self, I, F>where
Self: Sized,
U: Parser<I>,
F: FnMut(Self::Output) -> U,
fn and_then<U, F>(self, f: F) -> AndThen<Self, I, F>where Self: Sized, U: Parser<I>, F: FnMut(Self::Output) -> U,
Fail if the subparser fail, otherwise calls f with the new Parser and parse the Parser
source§fn or_else<U, F>(self, f: F) -> OrElse<Self, I, F>where
Self: Sized,
U: Parser<I, Output = Self::Output>,
F: FnMut() -> U,
fn or_else<U, F>(self, f: F) -> OrElse<Self, I, F>where Self: Sized, U: Parser<I, Output = Self::Output>, F: FnMut() -> U,
Pass if subparser pass, otherwise calls f and parse the result Parser
source§fn or_trans<F>(self, no_retry: bool, f: F) -> OrTrans<Self, I, F>where
Self: Sized,
F: FnMut(I, Range<usize>) -> Self::Output,
fn or_trans<F>(self, no_retry: bool, f: F) -> OrTrans<Self, I, F>where Self: Sized, F: FnMut(I, Range<usize>) -> Self::Output,
Pass if subparser pass, otherwise calls f with error point Read more
Auto Trait Implementations§
impl<I, O = ()> !RefUnwindSafe for Dyn<I, O>
impl<I, O = ()> !Send for Dyn<I, O>
impl<I, O = ()> !Sync for Dyn<I, O>
impl<I, O> Unpin for Dyn<I, O>
impl<I, O = ()> !UnwindSafe for Dyn<I, O>
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