Skip to main content

CausalMultiVectorWitness

Struct CausalMultiVectorWitness 

Source
pub struct CausalMultiVectorWitness;

Trait Implementations§

Source§

impl Adjunction<CausalMultiVectorWitness, CausalMultiVectorWitness, Metric> for CausalMultiVectorWitness

Source§

fn unit<A>(ctx: &Metric, a: A) -> CausalMultiVector<CausalMultiVector<A>>

The Unit of the Adjunction: A → R<L> Read more
Source§

fn counit<B>(_ctx: &Metric, lrb: CausalMultiVector<CausalMultiVector<B>>) -> B

The Counit of the Adjunction: L<R> → B Read more
Source§

fn left_adjunct<A, B, F>(ctx: &Metric, a: A, f: F) -> CausalMultiVector<B>

Source§

fn right_adjunct<A, B, F>(_ctx: &Metric, la: CausalMultiVector<A>, f: F) -> B

The Right Adjunct: (A → R) → (L → B) Read more
Source§

impl Applicative<CausalMultiVectorWitness> for CausalMultiVectorWitness

Source§

fn apply<A, B, Func>( f_ab: CausalMultiVector<Func>, f_a: CausalMultiVector<A>, ) -> CausalMultiVector<B>

Applies a function wrapped in a context (f_ab) to a value wrapped in a context (f_a). Read more
Source§

impl CoMonad<CausalMultiVectorWitness> for CausalMultiVectorWitness

Source§

fn extract<A>(fa: &CausalMultiVector<A>) -> A

Extracts the value at the current focus of the comonadic context. Read more
Source§

fn extend<A, B, Func>( fa: &CausalMultiVector<A>, f: Func, ) -> CausalMultiVector<B>

Extends the comonadic context by applying a function to its observed state. Read more
Source§

fn duplicate<A>( fa: &<F as HKT>::Type<A>, ) -> <F as HKT>::Type<<F as HKT>::Type<A>>
where A: Satisfies<<F as HKT>::Constraint> + Clone, <F as HKT>::Type<A>: Satisfies<<F as HKT>::Constraint> + Clone,

Duplicates the comonadic context. Read more
Source§

impl Foldable<CausalMultiVectorWitness> for CausalMultiVectorWitness

Source§

fn fold<A, B, Func>(fa: CausalMultiVector<A>, init: B, f: Func) -> B
where A: Satisfies<NoConstraint>, Func: FnMut(B, A) -> B,

Reduces the elements of the structure to a single value by applying a function. Read more
Source§

impl Functor<CausalMultiVectorWitness> for CausalMultiVectorWitness

Source§

fn fmap<A, B, Func>(fa: CausalMultiVector<A>, f: Func) -> CausalMultiVector<B>
where A: Satisfies<NoConstraint>, B: Satisfies<NoConstraint>, Func: FnMut(A) -> B,

Applies a function f to the value inside the container m_a. Read more
Source§

impl HKT for CausalMultiVectorWitness

Source§

type Constraint = NoConstraint

The constraint on inner types. Use NoConstraint for fully polymorphic.
Source§

type Type<T> = CausalMultiVector<T>

The Generic Associated Type (GAT) that represents the type constructor. The <T> is the “hole” in the type constructor (e.g., Option<T>). Read more
Source§

impl Monad<CausalMultiVectorWitness> for CausalMultiVectorWitness

Source§

fn bind<A, B, Func>(ma: CausalMultiVector<A>, f: Func) -> CausalMultiVector<B>

Chains a computation from an effectful value, flattening the result. This is the core sequencing operation of a Monad. Read more
Source§

fn join<A>(m_m_a: <F as HKT>::Type<<F as HKT>::Type<A>>) -> <F as HKT>::Type<A>
where A: Satisfies<<F as HKT>::Constraint>, <F as HKT>::Type<A>: Satisfies<<F as HKT>::Constraint>,

Flatten a nested structure into a single layer. Read more
Source§

impl Pure<CausalMultiVectorWitness> for CausalMultiVectorWitness

Source§

fn pure<T>(value: T) -> CausalMultiVector<T>

Lifts a pure value into the context F::Type<T>. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T, L, R, Context> AliasAdjunction<L, R, Context> for T
where T: Adjunction<L, R, Context>, L: HKT, R: HKT,

Source§

fn integrate<A, B, Func>(ctx: &Context, a: A, f: Func) -> <R as HKT>::Type<B>
where A: Satisfies<<L as HKT>::Constraint> + Satisfies<<R as HKT>::Constraint> + Clone, B: Satisfies<<R as HKT>::Constraint>, <L as HKT>::Type<A>: Satisfies<<R as HKT>::Constraint>, Func: Fn(<L as HKT>::Type<A>) -> B,

Alias for left_adjunct. Read more
Source§

fn differentiate<A, B, Func>( ctx: &Context, la: <L as HKT>::Type<A>, f: Func, ) -> B
where A: Satisfies<<L as HKT>::Constraint> + Clone, B: Satisfies<<L as HKT>::Constraint> + Satisfies<<R as HKT>::Constraint> + Clone, <R as HKT>::Type<B>: Satisfies<<L as HKT>::Constraint>, Func: FnMut(A) -> <R as HKT>::Type<B>,

Alias for right_adjunct. Read more
Source§

impl<T, F> AliasCoMonad<F> for T
where T: CoMonad<F>, F: HKT,

Source§

fn observe<A>(fa: &<F as HKT>::Type<A>) -> A
where A: Satisfies<<F as HKT>::Constraint> + Clone,

Alias for extract. Gets the value at the current focus.
Source§

fn propagate<A, B, Func>( fa: &<F as HKT>::Type<A>, f: Func, ) -> <F as HKT>::Type<B>
where A: Satisfies<<F as HKT>::Constraint> + Clone, B: Satisfies<<F as HKT>::Constraint>, Func: FnMut(&<F as HKT>::Type<A>) -> B,

Alias for extend. Propagates a computation across the context.
Source§

impl<T, F> AliasFoldable<F> for T
where T: Foldable<F>, F: HKT,

Source§

fn reduce<A, B, Func>(fa: <F as HKT>::Type<A>, init: B, f: Func) -> B
where A: Satisfies<<F as HKT>::Constraint>, Func: FnMut(B, A) -> B,

Alias for fold. Reduces elements to a single value.
Source§

impl<T, F> AliasFunctor<F> for T
where T: Functor<F>, F: HKT,

Source§

fn transform<A, B, Func>( m_a: <F as HKT>::Type<A>, f: Func, ) -> <F as HKT>::Type<B>
where A: Satisfies<<F as HKT>::Constraint>, B: Satisfies<<F as HKT>::Constraint>, Func: FnMut(A) -> B,

Alias for fmap. Transforms the value inside a container.
Source§

impl<T, F> AliasMonad<F> for T
where T: Monad<F>, F: HKT,

Source§

fn chain<A, B, Func>(m_a: <F as HKT>::Type<A>, f: Func) -> <F as HKT>::Type<B>
where A: Satisfies<<F as HKT>::Constraint>, B: Satisfies<<F as HKT>::Constraint>, Func: FnMut(A) -> <F as HKT>::Type<B>,

Alias for bind. Chains a computation, flattening the result.
Source§

fn flatten<A>( m_m_a: <F as HKT>::Type<<F as HKT>::Type<A>>, ) -> <F as HKT>::Type<A>
where A: Satisfies<<F as HKT>::Constraint>, <F as HKT>::Type<A>: Satisfies<<F as HKT>::Constraint>,

Alias for join. Flattens a nested container.
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, 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> Satisfies<NoConstraint> for T