pub struct ArrayVec<const N: usize>;
Expand description
tinyvec::ArrayVec
lifted to an HKT1
(Kind Type -> Type
)
Trait Implementations§
source§impl<const N: usize, AB> Apply<ArrayVec<N>, AB> for ArrayVec<[Option<AB>; N]>
impl<const N: usize, AB> Apply<ArrayVec<N>, AB> for ArrayVec<[Option<AB>; N]>
source§impl<A, const N: usize> Foldable<ArrayVec<N>, A> for ArrayVec<[Option<A>; N]>
impl<A, const N: usize> Foldable<ArrayVec<N>, A> for ArrayVec<[Option<A>; N]>
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, B, const N: usize> Traversable<ArrayVec<N>, A, B, Curry2<fn(_: B, _: ArrayVec<[Option<B>; N]>) -> ArrayVec<[Option<B>; N]>, Just<B>, Nothing<ArrayVec<[Option<B>; N]>>, ArrayVec<[Option<B>; N]>>> for ArrayVec<[Option<A>; N]>where
ArrayVec<N>: HKT1<T<B> = ArrayVec<[Option<B>; N]>>,
impl<A, B, const N: usize> Traversable<ArrayVec<N>, A, B, Curry2<fn(_: B, _: ArrayVec<[Option<B>; N]>) -> ArrayVec<[Option<B>; N]>, Just<B>, Nothing<ArrayVec<[Option<B>; N]>>, ArrayVec<[Option<B>; N]>>> for ArrayVec<[Option<A>; N]>where ArrayVec<N>: HKT1<T<B> = ArrayVec<[Option<B>; N]>>,
source§fn traversem1<Ap, AtoApOfB>(
self,
f: AtoApOfB
) -> Ap::T<ArrayVec<[Option<B>; N]>>where
Ap: HKT1,
Self: Foldable<ArrayVec<N>, A>,
Ap::T<B>: Applicative<Ap, B> + ApplyOnce<Ap, B>,
Ap::T<append1<N, B>>: Applicative<Ap, append1<N, B>> + ApplyOnce<Ap, append1<N, B>>,
Ap::T<ArrayVec<[Option<B>; N]>>: Applicative<Ap, ArrayVec<[Option<B>; N]>> + ApplyOnce<Ap, ArrayVec<[Option<B>; N]>>,
AtoApOfB: F1<A, Ret = Ap::T<B>>,
ArrayVec<N>: HKT1<T<A> = Self>,
fn traversem1<Ap, AtoApOfB>( self, f: AtoApOfB ) -> Ap::T<ArrayVec<[Option<B>; N]>>where Ap: HKT1, Self: Foldable<ArrayVec<N>, A>, Ap::T<B>: Applicative<Ap, B> + ApplyOnce<Ap, B>, Ap::T<append1<N, B>>: Applicative<Ap, append1<N, B>> + ApplyOnce<Ap, append1<N, B>>, Ap::T<ArrayVec<[Option<B>; N]>>: Applicative<Ap, ArrayVec<[Option<B>; N]>> + ApplyOnce<Ap, ArrayVec<[Option<B>; N]>>, AtoApOfB: F1<A, Ret = Ap::T<B>>, ArrayVec<N>: HKT1<T<A> = Self>,
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<ArrayVec<[Option<B>; N]>>where
Ap: HKT1,
Self: Foldable<ArrayVec<N>, A>,
B: Clone,
Ap::T<B>: Applicative<Ap, B>,
Ap::T<append1<N, B>>: Applicative<Ap, append1<N, B>>,
Ap::T<ArrayVec<[Option<B>; N]>>: Applicative<Ap, ArrayVec<[Option<B>; N]>>,
AtoApOfB: F1<A, Ret = Ap::T<B>>,
ArrayVec<N>: HKT1<T<A> = Self>,
fn traversemm<Ap, AtoApOfB>( self, f: AtoApOfB ) -> Ap::T<ArrayVec<[Option<B>; N]>>where Ap: HKT1, Self: Foldable<ArrayVec<N>, A>, B: Clone, Ap::T<B>: Applicative<Ap, B>, Ap::T<append1<N, B>>: Applicative<Ap, append1<N, B>>, Ap::T<ArrayVec<[Option<B>; N]>>: Applicative<Ap, ArrayVec<[Option<B>; N]>>, AtoApOfB: F1<A, Ret = Ap::T<B>>, ArrayVec<N>: HKT1<T<A> = Self>,
Traverse a structure with 0 or more elements, collecting into
an Applicative of 0 or more elements.
Auto Trait Implementations§
impl<const N: usize> RefUnwindSafe for ArrayVec<N>
impl<const N: usize> Send for ArrayVec<N>
impl<const N: usize> Sync for ArrayVec<N>
impl<const N: usize> Unpin for ArrayVec<N>
impl<const N: usize> UnwindSafe for ArrayVec<N>
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