pub struct StructuralFeatures {
pub terminal: bool,
pub products: bool,
pub initial: bool,
pub coproducts: bool,
pub exponentials: bool,
pub tensor: Option<TensorSpec>,
pub linear_hom: bool,
pub diagonal: DiagonalSpec,
pub terminal_morphism: TerminalSpec,
pub symmetry: bool,
}Expand description
Structural features present in a category.
These determine what type constructors and structural rules will be present in the derived type system.
Fields§
§terminal: boolTerminal object (unit type, 1)
products: boolBinary products (pair types, A × B)
initial: boolInitial object (empty type, 0)
coproducts: boolBinary coproducts (sum types, A + B)
exponentials: boolExponentials (function types, A → B) - cartesian
tensor: Option<TensorSpec>Tensor product specification (A ⊗ B)
linear_hom: boolLinear hom / internal hom (A ⊸ B)
diagonal: DiagonalSpecDiagonal morphism availability (contraction)
terminal_morphism: TerminalSpecTerminal morphism availability (weakening)
symmetry: boolSymmetry/braiding (exchange rule)
Trait Implementations§
Source§impl Clone for StructuralFeatures
impl Clone for StructuralFeatures
Source§fn clone(&self) -> StructuralFeatures
fn clone(&self) -> StructuralFeatures
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StructuralFeatures
impl Debug for StructuralFeatures
Source§impl Default for StructuralFeatures
impl Default for StructuralFeatures
Source§fn default() -> StructuralFeatures
fn default() -> StructuralFeatures
Returns the “default value” for a type. Read more
Source§impl PartialEq for StructuralFeatures
impl PartialEq for StructuralFeatures
impl Eq for StructuralFeatures
impl StructuralPartialEq for StructuralFeatures
Auto Trait Implementations§
impl Freeze for StructuralFeatures
impl RefUnwindSafe for StructuralFeatures
impl Send for StructuralFeatures
impl Sync for StructuralFeatures
impl Unpin for StructuralFeatures
impl UnwindSafe for StructuralFeatures
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