pub trait DblTheoryKind: Debug {
type Wrap<T>;
// Required methods
fn into_option<T>(wrapped: Self::Wrap<T>) -> Option<T>;
fn pure<T>(value: T) -> Self::Wrap<T>;
}Expand description
The kind of a double theory, determining whether hom types are guaranteed.
This trait uses a generic associated type (Wrap) to
control the return type of DblTheory::hom_type and
DblTheory::hom_op. For Unital theories, Wrap<T> is just T
(hom types always exist). For NonUnital theories, Wrap<T> is
Option<T> (hom types may not exist).
Required Associated Types§
Required Methods§
Sourcefn into_option<T>(wrapped: Self::Wrap<T>) -> Option<T>
fn into_option<T>(wrapped: Self::Wrap<T>) -> Option<T>
Converts a wrapped value into an Option, for code generic over the kind.
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.