Struct Expose

Source
pub struct Expose<M, F> { /* private fields */ }

Trait Implementations§

Source§

impl<M, F, N, T, U> Matcher<(T, U)> for Expose<M, F>
where M: Matcher<T>, F: Fn(&T) -> N + 'static, 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, F> Freeze for Expose<M, F>
where M: Freeze, F: Freeze,

§

impl<M, F> RefUnwindSafe for Expose<M, F>

§

impl<M, F> Send for Expose<M, F>
where M: Send, F: Send,

§

impl<M, F> Sync for Expose<M, F>
where M: Sync, F: Sync,

§

impl<M, F> Unpin for Expose<M, F>
where M: Unpin, F: Unpin,

§

impl<M, F> UnwindSafe for Expose<M, F>
where M: UnwindSafe, F: 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.