pub enum ParseError {
Show 23 variants
Toml(Error),
DimensionTooLarge(usize),
EmptySignature,
DuplicateBasisName(String),
InvalidBasisName {
name: String,
},
BasisIndexOutOfBounds {
name: String,
index: usize,
dim: usize,
},
NonContiguousBasisIndices {
expected: usize,
found: usize,
name: String,
},
InvalidGrade {
type_name: String,
grade: usize,
max: usize,
},
FieldCountMismatch {
type_name: String,
expected: usize,
got: usize,
},
DuplicateFieldName {
type_name: String,
field: String,
},
DuplicateTypeName(String),
InvalidBladeName {
name: String,
},
BladeIndexOutOfBounds {
name: String,
index: usize,
dim: usize,
},
UnknownType(String),
SelfAlias {
type_name: String,
},
AliasCycle {
type_name: String,
},
UnknownFieldName {
type_name: String,
field: String,
},
InvalidValue {
field: String,
value: String,
expected: String,
},
SparseBladeCountMismatch {
type_name: String,
blades: usize,
fields: usize,
},
SparseBladeGradeMismatch {
type_name: String,
blade: String,
blade_grade: usize,
grades: Vec<usize>,
},
IncompleteAlgebra {
name: String,
count: usize,
details: String,
},
MissingFieldMap {
type_name: String,
},
FieldMapGradeMismatch {
type_name: String,
field: String,
blade: String,
blade_grade: usize,
grades: Vec<usize>,
},
}Expand description
Errors that can occur when parsing an algebra specification.
Variants§
Toml(Error)
TOML syntax error.
DimensionTooLarge(usize)
Algebra dimension exceeds the maximum supported (6).
EmptySignature
Signature must have at least one basis vector.
DuplicateBasisName(String)
Duplicate basis vector name in signature.
InvalidBasisName
Invalid basis vector name in signature.
BasisIndexOutOfBounds
Basis vector index exceeds algebra dimension.
Fields
NonContiguousBasisIndices
Basis vector indices are not contiguous (0, 1, 2, …).
Fields
InvalidGrade
Type references a grade that exceeds the algebra dimension.
Fields
FieldCountMismatch
Type has wrong number of fields for its grades.
Fields
DuplicateFieldName
Duplicate field name in a type.
DuplicateTypeName(String)
Duplicate type name in specification.
InvalidBladeName
Invalid blade name in blades section.
BladeIndexOutOfBounds
Blade index exceeds algebra dimension.
UnknownType(String)
Unknown type reference (e.g., in alias_of).
SelfAlias
Type alias references itself.
AliasCycle
Type alias forms a cycle.
UnknownFieldName
Unknown field name in a type’s field list.
InvalidValue
Invalid value for a configuration field.
Fields
SparseBladeCountMismatch
Sparse type blade count doesn’t match field count.
Fields
SparseBladeGradeMismatch
Sparse type blade doesn’t match specified grades.
Fields
IncompleteAlgebra
Algebra is incomplete: some products don’t have matching output types.
Fields
MissingFieldMap
Type is missing required field_map.
FieldMapGradeMismatch
Blade grade in field_map doesn’t match type’s grades.
Trait Implementations§
Source§impl Debug for ParseError
impl Debug for ParseError
Source§impl Display for ParseError
impl Display for ParseError
Source§impl Error for ParseError
impl Error for ParseError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl Freeze for ParseError
impl RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnwindSafe for ParseError
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> 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