pub struct ResultOk<E>(_);
Expand description
core::result::Result
lifted to an HKT1
with the error type pinned to some E
.
(Kind Type -> Type
)
Trait Implementations§
source§impl<A, E> Applicative<ResultOk<E>, A> for Result<A, E>
impl<A, E> Applicative<ResultOk<E>, A> for Result<A, E>
source§impl<AB, E> Apply<ResultOk<E>, AB> for Result<AB, E>
impl<AB, E> Apply<ResultOk<E>, AB> for Result<AB, E>
source§impl<A, E> Foldable<ResultOk<E>, A> for Result<A, E>
impl<A, E> Foldable<ResultOk<E>, A> for Result<A, E>
source§fn foldl<B, BAB>(self, f: BAB, b: B) -> Bwhere
BAB: F2<B, A, Ret = B>,
fn foldl<B, BAB>(self, f: BAB, b: B) -> Bwhere BAB: F2<B, A, Ret = B>,
Fold the data structure from left -> right
source§fn foldr<B, ABB>(self, f: ABB, b: B) -> Bwhere
ABB: F2<A, B, Ret = B>,
fn foldr<B, ABB>(self, f: ABB, b: B) -> Bwhere ABB: F2<A, B, Ret = B>,
Fold the data structure from right -> left
source§fn foldl_ref<'a, B, BAB>(&'a self, f: BAB, b: B) -> Bwhere
BAB: F2<B, &'a A, Ret = B>,
A: 'a,
fn foldl_ref<'a, B, BAB>(&'a self, f: BAB, b: B) -> Bwhere BAB: F2<B, &'a A, Ret = B>, A: 'a,
Fold the data structure from left -> right
source§fn foldr_ref<'a, B, ABB>(&'a self, f: ABB, b: B) -> Bwhere
ABB: F2<&'a A, B, Ret = B>,
A: 'a,
fn foldr_ref<'a, B, ABB>(&'a self, f: ABB, b: B) -> Bwhere ABB: F2<&'a A, B, Ret = B>, A: 'a,
Fold the data structure from right -> left
source§fn contains<'a>(&'a self, a: &'a A) -> boolwhere
&'a A: PartialEq,
A: 'a,
fn contains<'a>(&'a self, a: &'a A) -> boolwhere &'a A: PartialEq, A: 'a,
Test if the structure contains a value
a
Read moresource§fn not_contains<'a>(&'a self, a: &'a A) -> boolwhere
&'a A: PartialEq,
A: 'a,
fn not_contains<'a>(&'a self, a: &'a A) -> boolwhere &'a A: PartialEq, A: 'a,
Test if the structure does not contain a value
a
Read moresource§fn any<'a, P>(&'a self, f: P) -> boolwhere
P: F1<&'a A, Ret = bool>,
A: 'a,
fn any<'a, P>(&'a self, f: P) -> boolwhere P: F1<&'a A, Ret = bool>, A: 'a,
Test if any element in the structure satisfies a predicate
f
Read moresource§fn all<'a, P>(&'a self, f: P) -> boolwhere
P: F1<&'a A, Ret = bool>,
A: 'a,
fn all<'a, P>(&'a self, f: P) -> boolwhere P: F1<&'a A, Ret = bool>, A: 'a,
Test if every element in the structure satisfies a predicate
f
Read moresource§impl<A, E> FoldableOnce<ResultOk<E>, A> for Result<A, E>
impl<A, E> FoldableOnce<ResultOk<E>, A> for Result<A, E>
source§impl<A, E> FunctorOnce<ResultOk<E>, A> for Result<A, E>
impl<A, E> FunctorOnce<ResultOk<E>, A> for Result<A, E>
source§impl<A, E> MonadOnce<ResultOk<E>, A> for Result<A, E>
impl<A, E> MonadOnce<ResultOk<E>, A> for Result<A, E>
source§impl<A, B, E> Traversable<ResultOk<E>, A, B, ()> for Result<A, E>
impl<A, B, E> Traversable<ResultOk<E>, A, B, ()> for Result<A, E>
source§fn traversem1<Ap, AtoApOfB>(
self,
f: AtoApOfB
) -> Ap::T<<ResultOk<E> as HKT1>::T<B>>where
Ap: HKT1,
Ap::T<B>: Applicative<Ap, B> + ApplyOnce<Ap, B>,
Ap::T<()>: Applicative<Ap, ()> + ApplyOnce<Ap, ()>,
Ap::T<<ResultOk<E> as HKT1>::T<B>>: Applicative<Ap, <ResultOk<E> as HKT1>::T<B>> + ApplyOnce<Ap, <ResultOk<E> as HKT1>::T<B>>,
AtoApOfB: F1<A, Ret = Ap::T<B>>,
fn traversem1<Ap, AtoApOfB>( self, f: AtoApOfB ) -> Ap::T<<ResultOk<E> as HKT1>::T<B>>where Ap: HKT1, Ap::T<B>: Applicative<Ap, B> + ApplyOnce<Ap, B>, Ap::T<()>: Applicative<Ap, ()> + ApplyOnce<Ap, ()>, Ap::T<<ResultOk<E> as HKT1>::T<B>>: Applicative<Ap, <ResultOk<E> as HKT1>::T<B>> + ApplyOnce<Ap, <ResultOk<E> as HKT1>::T<B>>, AtoApOfB: F1<A, Ret = Ap::T<B>>,
Traverse a structure with 0 or more elements, collecting into
an Applicative of 0 or 1 elements. Read more
source§fn traversemm<Ap, AtoApOfB>(
self,
f: AtoApOfB
) -> Ap::T<<ResultOk<E> as HKT1>::T<B>>where
Ap: HKT1,
Ap::T<B>: Applicative<Ap, B>,
Ap::T<()>: Applicative<Ap, ()>,
Ap::T<<ResultOk<E> as HKT1>::T<B>>: Applicative<Ap, <ResultOk<E> as HKT1>::T<B>>,
AtoApOfB: F1<A, Ret = Ap::T<B>>,
fn traversemm<Ap, AtoApOfB>( self, f: AtoApOfB ) -> Ap::T<<ResultOk<E> as HKT1>::T<B>>where Ap: HKT1, Ap::T<B>: Applicative<Ap, B>, Ap::T<()>: Applicative<Ap, ()>, Ap::T<<ResultOk<E> as HKT1>::T<B>>: Applicative<Ap, <ResultOk<E> as HKT1>::T<B>>, AtoApOfB: F1<A, Ret = Ap::T<B>>,
Traverse a structure with 0 or more elements, collecting into
an Applicative of 0 or more elements.
source§fn traverse<Ap, AtoApOfB>(self, f: AtoApOfB) -> Ap::T<F::T<B>>where
Ap: HKT1,
Self: Sized + Foldable<F, A>,
Ap::T<B>: Applicative<Ap, B> + ApplyOnce<Ap, B>,
Ap::T<TF>: Applicative<Ap, TF> + ApplyOnce<Ap, TF>,
Ap::T<F::T<B>>: Applicative<Ap, F::T<B>> + ApplyOnce<Ap, F::T<B>>,
AtoApOfB: F1<A, Ret = Ap::T<B>>,
F: HKT1<T<A> = Self>,
fn traverse<Ap, AtoApOfB>(self, f: AtoApOfB) -> Ap::T<F::T<B>>where Ap: HKT1, Self: Sized + Foldable<F, A>, Ap::T<B>: Applicative<Ap, B> + ApplyOnce<Ap, B>, Ap::T<TF>: Applicative<Ap, TF> + ApplyOnce<Ap, TF>, Ap::T<F::T<B>>: Applicative<Ap, F::T<B>> + ApplyOnce<Ap, F::T<B>>, AtoApOfB: F1<A, Ret = Ap::T<B>>, F: HKT1<T<A> = Self>,
Aliases
Traversable::traversem1
source§impl<A, B, E> TraversableOnce<ResultOk<E>, A, B, ()> for Result<A, E>where
ResultOk<E>: HKT1<T<B> = Result<B, E>> + HKT1<T<A> = Result<A, E>>,
impl<A, B, E> TraversableOnce<ResultOk<E>, A, B, ()> for Result<A, E>where ResultOk<E>: HKT1<T<B> = Result<B, E>> + HKT1<T<A> = Result<A, E>>,
source§fn traverse1m<Ap, AtoApOfB>(self, f: AtoApOfB) -> Ap::T<Result<B, E>>where
Ap: HKT1,
Ap::T<B>: Applicative<Ap, B>,
Ap::T<Result<B, E>>: Applicative<Ap, Result<B, E>>,
AtoApOfB: F1Once<A, Ret = Ap::T<B>>,
fn traverse1m<Ap, AtoApOfB>(self, f: AtoApOfB) -> Ap::T<Result<B, E>>where Ap: HKT1, Ap::T<B>: Applicative<Ap, B>, Ap::T<Result<B, E>>: Applicative<Ap, Result<B, E>>, AtoApOfB: F1Once<A, Ret = Ap::T<B>>,
Traverse a structure with 0 or 1 elements, collecting into
an Applicative of 0 or more elements.
source§fn traverse11<Ap, AtoApOfB>(self, f: AtoApOfB) -> Ap::T<Result<B, E>>where
Ap: HKT1,
Ap::T<B>: Applicative<Ap, B> + ApplyOnce<Ap, B>,
Ap::T<()>: Applicative<Ap, ()> + ApplyOnce<Ap, ()>,
Ap::T<Result<B, E>>: Applicative<Ap, Result<B, E>> + ApplyOnce<Ap, Result<B, E>>,
AtoApOfB: F1Once<A, Ret = Ap::T<B>>,
fn traverse11<Ap, AtoApOfB>(self, f: AtoApOfB) -> Ap::T<Result<B, E>>where Ap: HKT1, Ap::T<B>: Applicative<Ap, B> + ApplyOnce<Ap, B>, Ap::T<()>: Applicative<Ap, ()> + ApplyOnce<Ap, ()>, Ap::T<Result<B, E>>: Applicative<Ap, Result<B, E>> + ApplyOnce<Ap, Result<B, E>>, AtoApOfB: F1Once<A, Ret = Ap::T<B>>,
Traverse a structure with 0 or 1 elements, collecting into
an Applicative of 0 or 1 elements. Read more
source§fn traverse_swap<Ap, AtoApOfB>(self, f: AtoApOfB) -> Ap::T<F::T<B>>where
Ap: HKT1,
Self: Sized + FoldableOnce<F, A>,
Ap::T<B>: Applicative<Ap, B> + ApplyOnce<Ap, B>,
Ap::T<TF>: Applicative<Ap, TF> + ApplyOnce<Ap, TF>,
Ap::T<F::T<B>>: Applicative<Ap, F::T<B>> + ApplyOnce<Ap, F::T<B>>,
AtoApOfB: F1Once<A, Ret = Ap::T<B>>,
F: HKT1<T<A> = Self>,
fn traverse_swap<Ap, AtoApOfB>(self, f: AtoApOfB) -> Ap::T<F::T<B>>where Ap: HKT1, Self: Sized + FoldableOnce<F, A>, Ap::T<B>: Applicative<Ap, B> + ApplyOnce<Ap, B>, Ap::T<TF>: Applicative<Ap, TF> + ApplyOnce<Ap, TF>, Ap::T<F::T<B>>: Applicative<Ap, F::T<B>> + ApplyOnce<Ap, F::T<B>>, AtoApOfB: F1Once<A, Ret = Ap::T<B>>, F: HKT1<T<A> = Self>,
Aliases
TraversableOnce::traverse11
source§fn traverse_replicate<Ap, AtoApOfB>(self, f: AtoApOfB) -> Ap::T<F::T<B>>where
Ap: HKT1,
Self: Sized + FoldableOnce<F, A>,
Ap::T<B>: Applicative<Ap, B>,
Ap::T<TF>: Applicative<Ap, TF>,
Ap::T<F::T<B>>: Applicative<Ap, F::T<B>>,
AtoApOfB: F1Once<A, Ret = Ap::T<B>>,
F: HKT1<T<A> = Self>,
fn traverse_replicate<Ap, AtoApOfB>(self, f: AtoApOfB) -> Ap::T<F::T<B>>where Ap: HKT1, Self: Sized + FoldableOnce<F, A>, Ap::T<B>: Applicative<Ap, B>, Ap::T<TF>: Applicative<Ap, TF>, Ap::T<F::T<B>>: Applicative<Ap, F::T<B>>, AtoApOfB: F1Once<A, Ret = Ap::T<B>>, F: HKT1<T<A> = Self>,
Aliases
TraversableOnce::traverse1m
Auto Trait Implementations§
impl<E> RefUnwindSafe for ResultOk<E>where E: RefUnwindSafe,
impl<E> Send for ResultOk<E>where E: Send,
impl<E> Sync for ResultOk<E>where E: Sync,
impl<E> Unpin for ResultOk<E>where E: Unpin,
impl<E> UnwindSafe for ResultOk<E>where E: UnwindSafe,
Blanket Implementations§
source§impl<F, A, TF, T> Sequence<F, A, TF> for T
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>,
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>,
See
Sequence