OptionW

Struct OptionW 

Source
pub struct OptionW(/* private fields */);

Trait Implementations§

Source§

impl Applicable for OptionW

Source§

fn liftA2<A, B, C>( f: impl Fn(A, B) -> C, a: Option<A>, b: Option<B>, ) -> Option<C>

Source§

fn ap<A, B>(f: Self::H<impl Fn(A) -> B>, a: Self::H<A>) -> Self::H<B>

Source§

impl ApplicableMut for OptionW

Source§

fn liftA2_mut<A, B, C>( f: impl FnMut(A, B) -> C, a: Option<A>, b: Option<B>, ) -> Option<C>

Source§

fn ap_mut<A, B>(f: Self::H<impl FnMut(A) -> B>, a: Self::H<A>) -> Self::H<B>

Source§

impl ApplicableOnce for OptionW

Source§

fn liftA2_once<A, B, C>( f: impl FnOnce(A, B) -> C, a: Option<A>, b: Option<B>, ) -> Option<C>

Source§

fn ap_once<A, B>(f: Self::H<impl FnOnce(A) -> B>, a: Self::H<A>) -> Self::H<B>

Source§

impl Endofunctor for OptionW

Source§

fn map<A, B>(f: impl Fn(A) -> B, a: Option<A>) -> Option<B>

Source§

impl EndofunctorMut for OptionW

Source§

fn map_mut<A, B>(f: impl FnMut(A) -> B, a: Option<A>) -> Option<B>

Source§

impl EndofunctorOnce for OptionW

Source§

fn map_once<A, B>(f: impl FnOnce(A) -> B, a: Option<A>) -> Option<B>

Source§

impl H1 for OptionW

Source§

type H<A> = Option<A>

Source§

impl Semimonad for OptionW

Source§

fn join<A>(a: Option<Option<A>>) -> Option<A>

Source§

impl Traversable for OptionW

Source§

fn traverse<A, B, P: Pointed + Applicable>( f: impl Fn(A) -> P::H<B>, a: Option<A>, ) -> P::H<Option<B>>

Source§

impl TraversableMut for OptionW

Source§

fn traverse_mut<A, B, P: Pointed + ApplicableMut>( f: impl FnMut(A) -> P::H<B>, a: Option<A>, ) -> P::H<Option<B>>

Source§

impl TraversableOnce for OptionW

Source§

fn traverse_once<A, B, P: Pointed + ApplicableOnce>( f: impl FnOnce(A) -> P::H<B>, a: Option<A>, ) -> P::H<Option<B>>

Auto Trait Implementations§

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<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.