Enum TypeViolation
pub enum TypeViolation<I> {
Show 26 variants
AdditiveTypeMismatch {
left: Box<ExpressionType<I>>,
right: Box<ExpressionType<I>>,
},
IncompatibleSupport {
left: Box<SpatialSupport<I>>,
right: Box<SpatialSupport<I>>,
},
DimensionOverflow {
operation: &'static str,
},
MultiplicationRequiresScalar,
IncompatibleFrame,
DivisionDenominatorNotScalar,
PowerRequiresScalar,
SinRequiresDimensionlessScalar,
CoordinateRequiresSpatialScope,
CoordinateAxisOutOfRange {
axis: usize,
dimensions: usize,
},
GradientRequiresSpatialSupport,
GradientRequiresVolume,
SpatialExtentInvalid,
DivergenceRequiresSpatialSupport,
DivergenceRequiresVolume,
DivergenceRequiresTensor,
SymmetricPartRequiresVolume,
SymmetricPartRequiresSquareSpatialTensor,
IsotropicLiftRequiresVolume,
IsotropicLiftRequiresInvariantScalar,
BoundaryOperatorRequiresBoundaryScope,
BoundaryOperandSupportMismatch,
NormalRequiresTensor,
PureOperatorApplication(PureOperatorError),
RootRequiresScalar,
ResidualSupportMismatch {
residual: Box<Option<SpatialSupport<I>>>,
relation: Box<Option<SpatialSupport<I>>>,
},
}Description
Pure typing failure, retaining identities without choosing diagnostics.
Variants§
AdditiveTypeMismatch
Additive operands have unequal dimensions or shapes.
Fields
left: Box<ExpressionType<I>>Left operand type.
right: Box<ExpressionType<I>>Right operand type.
IncompatibleSupport
Two spatial supports are nominally different.
Fields
left: Box<SpatialSupport<I>>Left spatial support.
right: Box<SpatialSupport<I>>Right spatial support.
DimensionOverflow
Physical-dimension exponent arithmetic overflowed.
MultiplicationRequiresScalar
Multiplication received two non-scalar operands.
IncompatibleFrame
Scalar scaling or a spatial operator received an incompatible frame.
DivisionDenominatorNotScalar
A division denominator was not scalar.
PowerRequiresScalar
Integer power received a non-scalar base.
SinRequiresDimensionlessScalar
Sine received a dimensioned or non-scalar operand.
CoordinateRequiresSpatialScope
A coordinate was used without a spatial Relation scope.
CoordinateAxisOutOfRange
A coordinate axis is outside the ambient dimension.
GradientRequiresSpatialSupport
Gradient received an expression without spatial support.
GradientRequiresVolume
Gradient support was not a volume Domain.
SpatialExtentInvalid
A spatial extent cannot be represented by the portable shape contract.
DivergenceRequiresSpatialSupport
Divergence received an expression without spatial support.
DivergenceRequiresVolume
Divergence support was not a volume Domain.
DivergenceRequiresTensor
Divergence received a scalar.
SymmetricPartRequiresVolume
Symmetric part received an unsupported or non-volume value.
SymmetricPartRequiresSquareSpatialTensor
Symmetric part received something other than an exact [d,d]
Cartesian tensor.
IsotropicLiftRequiresVolume
Isotropic lift received an unsupported or non-volume value.
IsotropicLiftRequiresInvariantScalar
Isotropic lift received something other than an invariant scalar.
BoundaryOperatorRequiresBoundaryScope
Trace or normal was used outside a boundary-scoped Relation.
BoundaryOperandSupportMismatch
Boundary operator input is not supported on the exact parent volume.
NormalRequiresTensor
Normal component received a scalar.
PureOperatorApplication(PureOperatorError)
A content-addressed pure definition rejected its exact application.
RootRequiresScalar
A root whose consumer requires one scalar value was shaped.
ResidualSupportMismatch
Residual support differs from its Relation scope.
Fields
residual: Box<Option<SpatialSupport<I>>>Support inferred for the residual root.
relation: Box<Option<SpatialSupport<I>>>Support declared by the Relation.
Implementations§
§impl<I> TypeViolation<I>
impl<I> TypeViolation<I>
pub const fn is_dimension_or_shape(&self) -> bool
pub const fn is_dimension_or_shape(&self) -> bool
Whether this violation is a numeric dimension/shape contract failure.
Trait Implementations§
§impl<I> Clone for TypeViolation<I>where
I: Clone,
impl<I> Clone for TypeViolation<I>where
I: Clone,
§impl<I> Debug for TypeViolation<I>where
I: Debug,
impl<I> Debug for TypeViolation<I>where
I: Debug,
§impl<I> Display for TypeViolation<I>where
I: Debug,
impl<I> Display for TypeViolation<I>where
I: Debug,
§impl<I> PartialEq for TypeViolation<I>where
I: PartialEq,
impl<I> PartialEq for TypeViolation<I>where
I: PartialEq,
§fn eq(&self, other: &TypeViolation<I>) -> bool
fn eq(&self, other: &TypeViolation<I>) -> bool
self and other values to be equal, and is used by ==.impl<I> Eq for TypeViolation<I>where
I: Eq,
impl<I> StructuralPartialEq for TypeViolation<I>
Auto Trait Implementations§
impl<I> Freeze for TypeViolation<I>
impl<I> RefUnwindSafe for TypeViolation<I>where
I: RefUnwindSafe,
impl<I> Send for TypeViolation<I>where
I: Send,
impl<I> Sync for TypeViolation<I>where
I: Sync,
impl<I> Unpin for TypeViolation<I>
impl<I> UnsafeUnpin for TypeViolation<I>
impl<I> UnwindSafe for TypeViolation<I>where
I: UnwindSafe,
Blanket Implementations§
Source§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Source§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
§fn approx(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
§impl<T> ConvUtil for T
impl<T> ConvUtil for T
§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
§fn into_as<Dst>(self) -> Dstwhere
Self: Sized + Into<Dst>,
fn into_as<Dst>(self) -> Dstwhere
Self: Sized + Into<Dst>,
§fn try_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + TryInto<Dst>,
fn try_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + TryInto<Dst>,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Source§impl<T> From<T> for T
impl<T> From<T> for T
Source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
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>where
F: FnOnce(&Self) -> bool,
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where
F: FnOnce(&Self) -> bool,
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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Same for T
impl<T> Same for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.