pub struct TypeSpec {
pub name: String,
pub grades: Vec<usize>,
pub description: Option<String>,
pub fields: Vec<FieldSpec>,
pub alias_of: Option<String>,
pub versor: Option<VersorSpec>,
pub is_sparse: bool,
pub inverse_sandwich_targets: Vec<String>,
}Expand description
A type definition in the specification.
Fields§
§name: StringType name (e.g., “Rotor”, “Vector”).
grades: Vec<usize>Grades contained in this type.
description: Option<String>Documentation string.
fields: Vec<FieldSpec>Fields in order (matching blade layout).
alias_of: Option<String>If this type aliases another (same storage layout).
versor: Option<VersorSpec>Versor information (if this type is a versor).
If present, this type can transform other elements via the sandwich
product: X' = V * X * rev(V).
is_sparse: boolWhether this type is sparse (uses only a subset of blades within its grades).
Sparse types have explicit blade mappings and don’t use all blades of their grades. For example, a Line in CGA uses only 6 of the 10 grade-3 blades.
inverse_sandwich_targets: Vec<String>Types that can be transformed via inverse sandwich product.
This allows non-versor types (like Circle in CGA) to perform
inverse sandwich transformations: X' = T * X * T⁻¹.
For versors, this is typically empty (uses auto-inferred targets). For blades like Circle, this explicitly lists valid targets.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TypeSpec
impl RefUnwindSafe for TypeSpec
impl Send for TypeSpec
impl Sync for TypeSpec
impl Unpin for TypeSpec
impl UnwindSafe for TypeSpec
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more