Expand description
Defines traits for common algebraic structures and functional abstractions,
such as Functor, Applicative and Monad.
Traits representing higher-kinded types (e.g., Functor) are implemented by
Brand types to simulate higher-kinded polymorphism, as Rust does not
natively support it.
Re-exports§
pub use alt::Alt;pub use alternative::Alternative;pub use applicative::Applicative;pub use apply_first::ApplyFirst;pub use apply_second::ApplySecond;pub use arrow::Arrow;pub use bifoldable::Bifoldable;pub use bifunctor::Bifunctor;pub use bitraversable::Bitraversable;pub use category::Category;pub use clone_fn::CloneFn;pub use clone_fn::LiftFn;pub use clone_fn::RefLiftFn;pub use commutative_ring::CommutativeRing;pub use comonad::Comonad;pub use compactable::Compactable;pub use contravariant::Contravariant;pub use deferrable::Deferrable;pub use division_ring::DivisionRing;pub use euclidean_ring::EuclideanRing;pub use extend::Extend;pub use extract::Extract;pub use field::Field;pub use filterable::Filterable;pub use filterable_with_index::FilterableWithIndex;pub use foldable::Foldable;pub use foldable_with_index::FoldableWithIndex;pub use functor::Functor;pub use functor_with_index::FunctorWithIndex;pub use heyting_algebra::HeytingAlgebra;pub use lazy_config::LazyConfig;pub use lift::Lift;pub use monad::Monad;pub use monad_plus::MonadPlus;pub use monad_rec::MonadRec;pub use monoid::Monoid;pub use natural_transformation::NaturalTransformation;pub use optics::AffineTraversalOptic;pub use optics::FoldOptic;pub use optics::GetterOptic;pub use optics::GrateOptic;pub use optics::IndexedFoldOptic;pub use optics::IndexedGetterOptic;pub use optics::IndexedLensOptic;pub use optics::IndexedOpticAdapter;pub use optics::IndexedOpticAdapterDiscardsFocus;pub use optics::IndexedSetterOptic;pub use optics::IndexedTraversalOptic;pub use optics::IsoOptic;pub use optics::LensOptic;pub use optics::Optic;pub use optics::PrismOptic;pub use optics::ReviewOptic;pub use optics::SetterOptic;pub use optics::TraversalOptic;pub use par_compactable::ParCompactable;pub use par_filterable::ParFilterable;pub use par_filterable_with_index::ParFilterableWithIndex;pub use par_foldable::ParFoldable;pub use par_foldable_with_index::ParFoldableWithIndex;pub use par_functor::ParFunctor;pub use par_functor_with_index::ParFunctorWithIndex;pub use par_ref_filterable::ParRefFilterable;pub use par_ref_filterable_with_index::ParRefFilterableWithIndex;pub use par_ref_foldable::ParRefFoldable;pub use par_ref_foldable_with_index::ParRefFoldableWithIndex;pub use par_ref_functor::ParRefFunctor;pub use par_ref_functor_with_index::ParRefFunctorWithIndex;pub use pipe::Pipe;pub use plus::Plus;pub use pointed::Pointed;pub use pointer::Pointer;pub use profunctor::Profunctor;pub use ref_alt::RefAlt;pub use ref_applicative::RefApplicative;pub use ref_apply_first::RefApplyFirst;pub use ref_apply_second::RefApplySecond;pub use ref_bifoldable::RefBifoldable;pub use ref_bifunctor::RefBifunctor;pub use ref_bitraversable::RefBitraversable;pub use ref_compactable::RefCompactable;pub use ref_counted_pointer::RefCountedPointer;pub use ref_filterable::RefFilterable;pub use ref_filterable_with_index::RefFilterableWithIndex;pub use ref_foldable::RefFoldable;pub use ref_foldable_with_index::RefFoldableWithIndex;pub use ref_functor::RefFunctor;pub use ref_functor_with_index::RefFunctorWithIndex;pub use ref_lift::RefLift;pub use ref_monad::RefMonad;pub use ref_pointed::RefPointed;pub use ref_semiapplicative::RefSemiapplicative;pub use ref_semimonad::RefSemimonad;pub use ref_traversable::RefTraversable;pub use ref_traversable_with_index::RefTraversableWithIndex;pub use ref_witherable::RefWitherable;pub use ring::Ring;pub use semiapplicative::Semiapplicative;pub use semigroup::Semigroup;pub use semigroupoid::Semigroupoid;pub use semimonad::Semimonad;pub use semiring::Semiring;pub use send_clone_fn::SendCloneFn;pub use send_clone_fn::SendLiftFn;pub use send_clone_fn::SendRefLiftFn;pub use send_deferrable::SendDeferrable;pub use send_ref_applicative::SendRefApplicative;pub use send_ref_apply_first::SendRefApplyFirst;pub use send_ref_apply_second::SendRefApplySecond;pub use send_ref_counted_pointer::SendRefCountedPointer;pub use send_ref_foldable::SendRefFoldable;pub use send_ref_foldable_with_index::SendRefFoldableWithIndex;pub use send_ref_functor::SendRefFunctor;pub use send_ref_functor_with_index::SendRefFunctorWithIndex;pub use send_ref_lift::SendRefLift;pub use send_ref_monad::SendRefMonad;pub use send_ref_pointed::SendRefPointed;pub use send_ref_semiapplicative::SendRefSemiapplicative;pub use send_ref_semimonad::SendRefSemimonad;pub use to_dyn_clone_fn::ToDynCloneFn;pub use to_dyn_fn::ToDynFn;pub use to_dyn_send_fn::ToDynSendFn;pub use traversable::Traversable;pub use traversable_with_index::TraversableWithIndex;pub use with_index::WithIndex;pub use witherable::Witherable;
Modules§
- alt
- Choosing between values in a context, associatively.
- alternative
- Alternative functors, combining
ApplicativeandPlus. - applicative
- Applicative functors, allowing for independent computations to be combined within a context.
- apply_
first - Sequencing of two computations while keeping the result of the first.
- apply_
second - Sequencing of two computations while keeping the result of the second.
- arrow
- Composable function wrappers with
CategoryandStronginstances. - bifoldable
- Data structures with two type arguments that can be folded into a single value.
- bifunctor
- Types that can be mapped over two type arguments simultaneously.
- bitraversable
- Data structures with two type arguments that can be traversed in an applicative context.
- category
- Categories, which are semigroupoids with an identity element for each object.
- clone_
fn - Cloneable wrappers over closures for generic handling of functions in higher-kinded contexts.
- commutative_
ring - Types where multiplication is commutative.
- comonad
- Comonads, the dual of monads, combining
ExtendandExtract. - compactable
- Data structures that can be compacted by filtering out
Noneor separated by splittingResultvalues. - contravariant
- Types that can be mapped over contravariantly.
- deferrable
- Types that can be constructed lazily from a computation.
- division_
ring - Types that support multiplicative inverses.
- euclidean_
ring - Types that support Euclidean division with a degree function.
- extend
- Cooperative extension of a local context-dependent computation to a global computation.
- extract
- Types that hold exactly one value which can be extracted.
- field
- Types that form a field (commutative division ring with Euclidean structure).
- filterable
- Data structures that can be filtered and partitioned based on predicates or mapping functions.
- filterable_
with_ index - A
Filterablewith an additional index. - foldable
- Data structures that can be folded into a single value from the left or right.
- foldable_
with_ index - A
Foldablewith an additional index. - functor
- Types that can be mapped over, allowing functions to be applied to values within a context.
- functor_
with_ index - A
Functorwith an additional index. - heyting_
algebra - Types that form a Heyting algebra (bounded lattice with implication).
- lazy_
config - Configuration trait for infallible memoization strategy.
- lift
- Lifting of functions to operate on values within a context.
- monad
- Monads, allowing for sequencing computations where the structure depends on previous results.
- monad_
plus - Monads with a choice operator and identity element, combining
MonadandAlternative. - monad_
rec - Monads that support stack-safe tail recursion via
ControlFlow. - monoid
- Types that have an identity element and an associative binary operation.
- natural_
transformation - Natural transformations between type constructors.
- optics
- Traits for optics.
- par_
compactable - Data structures that can be compacted and separated in parallel.
- par_
filterable - Data structures that can be filtered and filter-mapped in parallel.
- par_
filterable_ with_ index - A
ParFilterablewith an additional index. - par_
foldable - Data structures that can be folded in parallel.
- par_
foldable_ with_ index - A
ParFoldablewith an additional index. - par_
functor - Data structures that can be mapped over in parallel.
- par_
functor_ with_ index - A
ParFunctorwith an additional index. - par_
ref_ filterable - Parallel by-reference filterable.
- par_
ref_ filterable_ with_ index - Parallel by-reference filterable with index.
- par_
ref_ foldable - Parallel by-reference foldable.
- par_
ref_ foldable_ with_ index - Parallel by-reference foldable with index.
- par_
ref_ functor - Parallel by-reference functor mapping.
- par_
ref_ functor_ with_ index - Parallel by-reference functor mapping with index.
- pipe
- Left-to-right function application via method syntax.
- plus
- The identity element for
Alt, forming a monoid on type constructors. - pointed
- Contexts that can be initialized with a value via the
pureoperation. - pointer
- Independent traits for abstracting over different types of pointers and their capabilities.
- profunctor
- Profunctors, which are functors contravariant in the first argument and covariant in the second.
- ref_alt
- Choosing between values in a context by reference, associatively.
- ref_
applicative - By-ref applicative functors, combining
RefPointedandRefSemiapplicative. - ref_
apply_ first - Combining two by-ref contexts, keeping the first value, with
ref_apply_first. - ref_
apply_ second - Combining two by-ref contexts, keeping the second value, with
ref_apply_second. - ref_
bifoldable - By-reference variant of
Bifoldable. - ref_
bifunctor - Types that can be mapped over two type arguments simultaneously by reference.
- ref_
bitraversable - By-reference traversal of bifunctor structures.
- ref_
compactable - By-reference compacting and separating of structures.
- ref_
counted_ pointer - Reference-counted pointers with shared ownership, unwrapping, and take-cell capabilities.
- ref_
filterable - By-reference filtering and partitioning of structures.
- ref_
filterable_ with_ index - By-reference indexed filtering and partitioning of structures.
- ref_
foldable - By-reference variant of
Foldable. - ref_
foldable_ with_ index - By-reference variant of
FoldableWithIndex. - ref_
functor - Types that can be mapped over by receiving or returning references to their contents.
- ref_
functor_ with_ index - By-reference variant of
FunctorWithIndex. - ref_
lift - Lifting binary functions into contexts via references with
lift2. - ref_
monad - By-ref monads, combining
RefApplicativeandRefSemimonad. - ref_
pointed - Contexts that can be initialized from a reference via the
ref_pureoperation. - ref_
semiapplicative - Applying wrapped by-ref functions within contexts with
ref_apply. - ref_
semimonad - Contexts supporting by-reference monadic sequencing via
bind. - ref_
traversable - By-reference traversal of structures.
- ref_
traversable_ with_ index - By-reference indexed traversal of structures.
- ref_
witherable - By-reference withering (effectful filtering) of structures.
- ring
- Types that extend
Semiringwith subtraction. - semiapplicative
- Applying functions within a context to values within a context, without an identity element.
- semigroup
- Types that support an associative binary operation.
- semigroupoid
- Semigroupoids, representing objects and composable relationships (morphisms) between them.
- semimonad
- Sequencing of computations where the structure depends on previous results, without an identity element.
- semiring
- Types that form a semiring with addition and multiplication operations.
- send_
clone_ fn - Thread-safe cloneable wrappers over closures that carry
Send + Syncbounds. - send_
deferrable - Deferred lazy evaluation using thread-safe thunks.
- send_
ref_ applicative - Thread-safe by-ref applicative functors, combining
SendRefPointedandSendRefSemiapplicative. - send_
ref_ apply_ first - Thread-safe combining of two by-ref contexts, keeping the first value, with
send_ref_apply_first. - send_
ref_ apply_ second - Thread-safe combining of two by-ref contexts, keeping the second value, with
send_ref_apply_second. - send_
ref_ counted_ pointer - Thread-safe reference-counted pointers that carry
Send + Syncbounds. - send_
ref_ foldable - Thread-safe by-reference variant of
Foldable. - send_
ref_ foldable_ with_ index - Thread-safe by-reference variant of
FoldableWithIndex. - send_
ref_ functor - Types that can be mapped over by receiving references to their contents, with thread-safe mapping functions.
- send_
ref_ functor_ with_ index - Thread-safe by-reference variant of
FunctorWithIndex. - send_
ref_ lift - Thread-safe lifting of binary functions via references with
send_ref_lift2. - send_
ref_ monad - Thread-safe by-ref monads, combining
SendRefApplicativeandSendRefSemimonad. - send_
ref_ pointed - Thread-safe by-ref value injection with
send_ref_pure. - send_
ref_ semiapplicative - Thread-safe by-ref function application within contexts with
send_ref_apply. - send_
ref_ semimonad - Thread-safe by-ref monadic sequencing with
send_ref_bind. - to_
dyn_ clone_ fn - Pointer brands that can perform unsized coercion to
dyn Fntrait objects. - to_
dyn_ fn - Coercion of sized closures into
dyn Fntrait objects behind aPointer. - to_
dyn_ send_ fn - Pointer brands that can perform unsized coercion to thread-safe
dyn Fntrait objects. - traversable
- Data structures that can be traversed, accumulating results in an applicative context.
- traversable_
with_ index - A
Traversablewith an additional index. - with_
index - A type class for types that have a canonical index associated with their structure.
- witherable
- Data structures that can be traversed and filtered simultaneously in an applicative context.