Struct ResultTypeCon

Source
pub struct ResultTypeCon<E> { /* private fields */ }

Trait Implementations§

Source§

impl<E> Applicative for TypeCon<E>
where E: Clone,

Source§

fn ap<TIn, TOut, TFunc>( f: &<TypeCon<E> as WithTypeArg<TFunc>>::Type, x: &<TypeCon<E> as WithTypeArg<TIn>>::Type, ) -> <TypeCon<E> as WithTypeArg<TOut>>::Type
where TFunc: Fn(&TIn) -> TOut,

Source§

fn lift2<TIn1, TIn2, TOut, TFunc>( f: TFunc, x1: &<TypeCon<E> as WithTypeArg<TIn1>>::Type, x2: &<TypeCon<E> as WithTypeArg<TIn2>>::Type, ) -> <TypeCon<E> as WithTypeArg<TOut>>::Type
where TFunc: Fn(&TIn1, &TIn2) -> TOut,

Source§

impl<E> Functor for TypeCon<E>
where E: Clone,

Source§

fn fmap<TIn, TOut, F>( f: F, x: &<TypeCon<E> as WithTypeArg<TIn>>::Type, ) -> <TypeCon<E> as WithTypeArg<TOut>>::Type
where F: Fn(&TIn) -> TOut,

Source§

fn fmapconst<TIn, TOut>( e: &TOut, x: &<Self as WithTypeArg<TIn>>::Type, ) -> <Self as WithTypeArg<TOut>>::Type
where Self: WithTypeArg<TIn> + WithTypeArg<TOut>, TOut: Clone,

Source§

impl<E> Lift for TypeCon<E>

Source§

fn lift<T>(x: T) -> <TypeCon<E> as WithTypeArg<T>>::Type

Source§

impl<E> LinearApplicative for TypeCon<E>

Source§

fn lap<TIn, TOut, TFunc>( f: <TypeCon<E> as WithTypeArg<TFunc>>::Type, x: <TypeCon<E> as WithTypeArg<TIn>>::Type, ) -> <TypeCon<E> as WithTypeArg<TOut>>::Type
where TFunc: FnOnce(TIn) -> TOut,

Source§

fn llift2<TIn1, TIn2, TOut, TFunc>( f: TFunc, x1: <TypeCon<E> as WithTypeArg<TIn1>>::Type, x2: <TypeCon<E> as WithTypeArg<TIn2>>::Type, ) -> <TypeCon<E> as WithTypeArg<TOut>>::Type
where TFunc: FnOnce(TIn1, TIn2) -> TOut,

Source§

impl<E> LinearFunctor for TypeCon<E>

Source§

fn lmap<TIn, TOut, F>( f: F, x: <TypeCon<E> as WithTypeArg<TIn>>::Type, ) -> <TypeCon<E> as WithTypeArg<TOut>>::Type
where F: Fn(TIn) -> TOut,

Source§

fn lmapconst<TIn, TOut>( e: &TOut, x: <Self as WithTypeArg<TIn>>::Type, ) -> <Self as WithTypeArg<TOut>>::Type
where Self: WithTypeArg<TIn> + WithTypeArg<TOut>, TOut: Clone,

Source§

impl<E> LinearMonad for TypeCon<E>

Source§

fn lbind<TIn, TOut, F>( x: <TypeCon<E> as WithTypeArg<TIn>>::Type, f: F, ) -> <TypeCon<E> as WithTypeArg<TOut>>::Type
where F: FnOnce(TIn) -> <TypeCon<E> as WithTypeArg<TOut>>::Type,

Source§

fn lbind_ignore<TIn, TOut>( x: <Self as WithTypeArg<TIn>>::Type, y: &<Self as WithTypeArg<TOut>>::Type, ) -> <Self as WithTypeArg<TOut>>::Type
where Self: WithTypeArg<TIn> + WithTypeArg<TOut>, <Self as WithTypeArg<TOut>>::Type: Clone,

Source§

fn ljoin<T>( x: <Self as WithTypeArg<<Self as WithTypeArg<T>>::Type>>::Type, ) -> <Self as WithTypeArg<T>>::Type
where Self: WithTypeArg<T> + WithTypeArg<<Self as WithTypeArg<T>>::Type>,

Source§

impl<E> Monad for TypeCon<E>
where E: Clone,

Source§

fn bind<TIn, TOut, F>( x: &<TypeCon<E> as WithTypeArg<TIn>>::Type, f: F, ) -> <TypeCon<E> as WithTypeArg<TOut>>::Type
where F: Fn(&TIn) -> <TypeCon<E> as WithTypeArg<TOut>>::Type,

Source§

fn bind_ignore<TIn, TOut>( x: &<Self as WithTypeArg<TIn>>::Type, y: &<Self as WithTypeArg<TOut>>::Type, ) -> <Self as WithTypeArg<TOut>>::Type
where Self: WithTypeArg<TIn> + WithTypeArg<TOut>, <Self as WithTypeArg<TOut>>::Type: Clone,

Source§

fn fjoin<T>( x: &<Self as WithTypeArg<<Self as WithTypeArg<T>>::Type>>::Type, ) -> <Self as WithTypeArg<T>>::Type
where Self: WithTypeArg<T> + WithTypeArg<<Self as WithTypeArg<T>>::Type>, <Self as WithTypeArg<T>>::Type: Clone,

Source§

impl<T, E> WithTypeArg<T> for TypeCon<E>

Source§

type Type = Result<T, E>

Source§

impl<T, E> TypeApp<TypeCon<E>, T> for Result<T, E>

Auto Trait Implementations§

§

impl<E> Freeze for TypeCon<E>

§

impl<E> RefUnwindSafe for TypeCon<E>
where E: RefUnwindSafe,

§

impl<E> Send for TypeCon<E>
where E: Send,

§

impl<E> Sync for TypeCon<E>
where E: Sync,

§

impl<E> Unpin for TypeCon<E>
where E: Unpin,

§

impl<E> UnwindSafe for TypeCon<E>
where E: 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<T> Is for T

Source§

type Type = T

Source§

fn into_val(self) -> <T as Is>::Type

Source§

fn into_ref(&self) -> &<T as Is>::Type

Source§

fn into_mut_ref(&mut self) -> &mut <T as Is>::Type

Source§

fn from_val(x: <T as Is>::Type) -> T

Source§

fn from_ref(x: &<T as Is>::Type) -> &T

Source§

fn from_mut_ref(x: &mut <T as Is>::Type) -> &mut T

Source§

impl<T> SizedExt for T

Source§

fn lift<TCon>(self) -> <TCon as WithTypeArg<Self>>::Type
where TCon: Lift + WithTypeArg<Self> + ?Sized,

Source§

fn lap<TCon, TIn, TOut, TFunc, X>( self, x: X, ) -> <TCon as WithTypeArg<TOut>>::Type
where TCon: LinearApplicative + WithTypeArg<TFunc> + WithTypeArg<TIn> + WithTypeArg<TOut> + ?Sized, Self: TypeApp<TCon, TFunc>, TFunc: Fn(TIn) -> TOut, X: TypeApp<TCon, TIn>,

Source§

fn lmap<TCon, TIn, TOut, X>(self, x: X) -> <TCon as WithTypeArg<TOut>>::Type
where TCon: LinearFunctor + WithTypeArg<TIn> + WithTypeArg<TOut> + ?Sized, Self: Fn(TIn) -> TOut, X: TypeApp<TCon, TIn>,

Source§

fn lmapop<TCon, TIn, TOut, F>(self, f: F) -> <TCon as WithTypeArg<TOut>>::Type
where TCon: LinearFunctor + WithTypeArg<TIn> + WithTypeArg<TOut> + ?Sized, Self: TypeApp<TCon, TIn>, F: Fn(TIn) -> TOut,

Source§

fn fmap<TCon, TIn, TOut, X>(self, x: &X) -> <TCon as WithTypeArg<TOut>>::Type
where TCon: Functor + WithTypeArg<TIn> + WithTypeArg<TOut> + ?Sized, Self: Fn(&TIn) -> TOut, X: TypeApp<TCon, TIn> + ?Sized,

Source§

fn fmapop<TCon, TIn, TOut, F>(&self, f: F) -> <TCon as WithTypeArg<TOut>>::Type
where TCon: Functor + WithTypeArg<TIn> + WithTypeArg<TOut> + ?Sized, Self: TypeApp<TCon, TIn>, F: Fn(&TIn) -> TOut,

Source§

fn lbind<TCon, TIn, TOut, F, TResult>(self, f: F) -> TResult
where TCon: LinearMonad + WithTypeArg<TIn> + WithTypeArg<TOut> + ?Sized, F: Fn(TIn) -> TResult, TResult: TypeApp<TCon, TOut>, Self: TypeApp<TCon, TIn>,

Source§

fn lbind_ignore<TCon, TIn, TOut, TResult>(self, y: &TResult) -> TResult
where TCon: LinearMonad + WithTypeArg<TIn> + WithTypeArg<TOut> + ?Sized, Self: TypeApp<TCon, TIn>, TResult: TypeApp<TCon, TOut>, <TCon as WithTypeArg<TOut>>::Type: Clone,

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

impl<T> UnsizedExt for T

Source§

fn ap<TCon, TIn, TOut, TFunc, X>( &self, x: &X, ) -> <TCon as WithTypeArg<TOut>>::Type
where Self: TypeApp<TCon, TFunc>, TCon: Applicative + WithTypeArg<TFunc> + WithTypeArg<TIn> + WithTypeArg<TOut>, TFunc: Fn(&TIn) -> TOut, X: TypeApp<TCon, TIn> + ?Sized,

Source§

fn bind<TCon, TIn, TOut, F, TResult>(&self, f: F) -> TResult
where TCon: Monad + WithTypeArg<TIn> + WithTypeArg<TOut> + ?Sized, F: Fn(&TIn) -> TResult, TResult: TypeApp<TCon, TOut>, Self: TypeApp<TCon, TIn>,

Source§

fn bind_ignore<TCon, TIn, TOut, TResult>(&self, y: &TResult) -> TResult
where TCon: Monad + WithTypeArg<TIn> + WithTypeArg<TOut> + ?Sized, Self: TypeApp<TCon, TIn>, TResult: TypeApp<TCon, TOut>, <TCon as WithTypeArg<TOut>>::Type: Clone,

Source§

fn fjoin<TCon, T, TInner>(&self) -> <TCon as WithTypeArg<T>>::Type
where TCon: Monad + WithTypeArg<T> + WithTypeArg<TInner> + WithTypeArg<<TCon as WithTypeArg<T>>::Type> + ?Sized, Self: TypeApp<TCon, TInner>, TInner: TypeApp<TCon, T>, <TCon as WithTypeArg<T>>::Type: Clone,