Chain

Struct Chain 

Source
pub struct Chain<M, N>(/* private fields */);

Trait Implementations§

Source§

impl<M, N, T, U> Matcher<(T, U)> for Chain<M, N>
where M: Matcher<T>, N: Matcher<U>,

Source§

fn do_match(&self, bs: &mut ByteStream) -> Result<(T, U), MatchError>

Source§

fn boxed(self) -> Box<dyn Matcher<T>>
where Self: Sized + 'static,

Source§

fn then<U, That>(self, that: That) -> Chain<Self, That>
where Self: Sized, That: Matcher<U>,

Source§

fn then_with<U, F, N>(self, f: F) -> Expose<Self, F>
where Self: Sized, F: Fn(&T) -> N + 'static, N: Matcher<U>,

Source§

fn map<U, F>(self, f: F) -> Map<Self, T, F>
where Self: Sized, F: Fn(T) -> U + 'static,

Source§

fn then_map<U, That, F, V>( self, that: That, f: F, ) -> Map<Chain<Self, That>, (T, U), F>
where Self: Sized, That: Matcher<U>, F: Fn((T, U)) -> V + 'static,

Auto Trait Implementations§

§

impl<M, N> Freeze for Chain<M, N>
where M: Freeze, N: Freeze,

§

impl<M, N> RefUnwindSafe for Chain<M, N>

§

impl<M, N> Send for Chain<M, N>
where M: Send, N: Send,

§

impl<M, N> Sync for Chain<M, N>
where M: Sync, N: Sync,

§

impl<M, N> Unpin for Chain<M, N>
where M: Unpin, N: Unpin,

§

impl<M, N> UnwindSafe for Chain<M, N>
where M: UnwindSafe, N: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<M, T, U> ParserExt<T, U> for M
where M: Matcher<(T, U)>,

Source§

fn save<F>(self, f: F) -> Save<M, T, U, F>
where F: Fn(&mut T, U) + 'static,

Source§

fn skip(self) -> Skip<M, T, U>

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.