pub trait Coproduct: Arrow {
// Required methods
fn initial_object() -> Self::Object;
fn initial(a: Self::Object) -> Self;
fn inj0(a: Self::Object, b: Self::Object) -> Self;
fn inj1(a: Self::Object, b: Self::Object) -> Self;
fn coproduct(&self, other: &Self) -> Option<Self>;
}
Required Methods§
fn initial_object() -> Self::Object
Sourcefn initial(a: Self::Object) -> Self
fn initial(a: Self::Object) -> Self
Construct the initial arrow initial_a : 0 → a
from some object a
fn inj0(a: Self::Object, b: Self::Object) -> Self
fn inj1(a: Self::Object, b: Self::Object) -> Self
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.