pub trait ApplyFirst: Kind0L1T {
// Required method
fn apply_first<'a, ClonableFnBrand: 'a + ClonableFn, A: 'a + Clone, B>(
fa: Apply0L1T<Self, A>,
) -> ApplyFn<'a, ClonableFnBrand, Apply0L1T<Self, B>, Apply0L1T<Self, A>>;
}
Expand description
A typeclass for types that support combining two contexts, keeping the first value.
ApplyFirst
provides the ability to sequence two computations but discard
the result of the second computation, keeping only the result of the first.
This is useful for executing side effects in sequence while preserving the
primary result.
Required Methods§
Sourcefn apply_first<'a, ClonableFnBrand: 'a + ClonableFn, A: 'a + Clone, B>(
fa: Apply0L1T<Self, A>,
) -> ApplyFn<'a, ClonableFnBrand, Apply0L1T<Self, B>, Apply0L1T<Self, A>>
fn apply_first<'a, ClonableFnBrand: 'a + ClonableFn, A: 'a + Clone, B>( fa: Apply0L1T<Self, A>, ) -> ApplyFn<'a, ClonableFnBrand, Apply0L1T<Self, B>, Apply0L1T<Self, A>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.