pub struct FunctionalComposer { /* private fields */ }Expand description
Functional composition patterns using higher-order functions
Provides functional programming patterns for component composition including functors, monads, applicatives, and category theory constructs.
Implementations§
Source§impl FunctionalComposer
impl FunctionalComposer
Sourcepub fn compose<A, B, C>(
self,
f: Box<dyn Fn(A) -> B + Send + Sync>,
g: Box<dyn Fn(B) -> C + Send + Sync>,
) -> Self
pub fn compose<A, B, C>( self, f: Box<dyn Fn(A) -> B + Send + Sync>, g: Box<dyn Fn(B) -> C + Send + Sync>, ) -> Self
Compose functions using the composition operator
Sourcepub fn morphism(self, morphism: CategoryMorphism) -> Self
pub fn morphism(self, morphism: CategoryMorphism) -> Self
Add category theory morphism
Sourcepub fn build(self) -> FunctionalComposition
pub fn build(self) -> FunctionalComposition
Build functional composition
Trait Implementations§
Source§impl Debug for FunctionalComposer
impl Debug for FunctionalComposer
Auto Trait Implementations§
impl Freeze for FunctionalComposer
impl !RefUnwindSafe for FunctionalComposer
impl Send for FunctionalComposer
impl Sync for FunctionalComposer
impl Unpin for FunctionalComposer
impl !UnwindSafe for FunctionalComposer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more