Struct naan::impls::result::hkt::Result

source ·
pub struct Result;
Expand description

core::result::Result lifted to an HKT2

(Kind Type -> Type -> Type)

Trait Implementations§

source§

impl<A, E> Bifunctor<Result, A, E> for Result<A, E>

source§

fn bimap<AB, BB, FA, FB>(self, fa: FA, fb: FB) -> <Result as HKT2>::T<AB, BB>where FA: F1<A, Ret = AB>, FB: F1<E, Ret = BB>,

source§

fn lmap<A2, FA>(self, fa: FA) -> F::T<A2, B>where Self: Sized, FA: F1<A, Ret = A2>,

Map the left type in the Bifunctor Read more
source§

fn rmap<B2, FB>(self, fb: FB) -> F::T<A, B2>where Self: Sized, FB: F1<B, Ret = B2>,

Map the right type in the Bifunctor Read more
source§

impl<A, E> BifunctorOnce<Result, A, E> for Result<A, E>

source§

fn bimap1<AB, BB, FA, FB>(self, fa: FA, fb: FB) -> <Result as HKT2>::T<AB, BB>where FA: F1Once<A, Ret = AB>, FB: F1Once<E, Ret = BB>,

source§

fn lmap1<A2, FA>(self, fa: FA) -> F::T<A2, B>where Self: Sized, FA: F1Once<A, Ret = A2>,

Map the left type in the Bifunctor Read more
source§

fn rmap1<B2, FB>(self, fb: FB) -> F::T<A, B2>where Self: Sized, FB: F1Once<B, Ret = B2>,

Map the right type in the Bifunctor Read more
source§

impl HKT2 for Result

§

type T<A, B> = Result<A, B>

The generic type

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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<F, A, TF, T> Sequence<F, A, TF> for T

source§

fn sequence<Ap>(self) -> Ap::T<F::T<A>>where Self: Sized + Traversable<F, Ap::T<A>, A, TF> + Foldable<F, Ap::T<A>>, Ap: HKT1, Ap::T<A>: Applicative<Ap, A> + ApplyOnce<Ap, A>, Ap::T<TF>: Applicative<Ap, TF> + ApplyOnce<Ap, TF>, Ap::T<F::T<A>>: Applicative<Ap, F::T<A>> + ApplyOnce<Ap, F::T<A>>, F: HKT1<T<Ap::T<A>> = Self>,

source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.