pub trait Category: Semigroupoid {
// Required method
fn identity<'a, A: 'a>() -> Apply1L2T<'a, Self, A, A>;
}
Expand description
A type class for categories.
Category
extends Semigroupoid
with an identity element.
§Laws
Category
instances must satisfy the identity law:
- Identity:
compose(identity)(p) = compose(p)(identity)
.
Required Methods§
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.