Struct Cond

pub struct Cond<F> { /* private fields */ }

Parser implementation for [cond]

Trait Implementations

impl<I, F> Parser<I> for Cond<F> where F: Parser<I>,

type Output = Option<<F as Parser<I>>::Output>;
type Error = <F as Parser<I>>::Error;
fn process<OM: OutputMode>(&mut self, input: I) -> PResult<OM, I, Self::Output, Self::Error>

Auto Trait Implementations

impl<F> Freeze for Cond<F> where Option<F>: Freeze,

impl<F> RefUnwindSafe for Cond<F> where Option<F>: RefUnwindSafe,

impl<F> Send for Cond<F> where Option<F>: Send,

impl<F> Sync for Cond<F> where Option<F>: Sync,

impl<F> Unpin for Cond<F> where Option<F>: Unpin,

impl<F> UnsafeUnpin for Cond<F> where Option<F>: UnsafeUnpin,

impl<F> UnwindSafe for Cond<F> where Option<F>: UnwindSafe,

Blanket Implementations

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

impl<T> From<T> for Cond<F>

fn from(t: T) -> T

Returns the argument unchanged.

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

fn into(self) -> U

Calls U::from(self).

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

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

type Error = never;
fn try_from(value: U) -> Result<T, never>

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

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