pub enum SemanticAdError {
CoreOperation,
EffectfulExtension {
family_id: &'static str,
},
MissingRule {
family_id: &'static str,
role: SemanticAdRuleRole,
},
Arity {
field: &'static str,
expected: usize,
actual: usize,
},
PrimalIndexOutOfBounds {
family_id: &'static str,
kind: PrimalValueKind,
index: usize,
len: usize,
},
UndeclaredResidualValue {
family_id: &'static str,
kind: PrimalValueKind,
index: usize,
},
ForeignValue {
field: &'static str,
index: usize,
},
Unsupported {
family_id: &'static str,
role: SemanticAdRuleRole,
message: String,
},
Rule {
family_id: &'static str,
role: SemanticAdRuleRole,
source: Box<dyn Error + Send + Sync + 'static>,
},
Invariant {
family_id: &'static str,
role: SemanticAdRuleRole,
message: String,
},
Build(ProgramBuildError),
}Expand description
Failures while dispatching or building semantic extension AD.
Variants§
CoreOperation
The supplied operation is not an extension operation.
EffectfulExtension
Observable effects make implicit differentiation unsafe.
MissingRule
No rule is registered for the requested family and role.
Fields
role: SemanticAdRuleRoleMissing semantic AD role.
Arity
An ordered request or result field has the wrong length.
Fields
PrimalIndexOutOfBounds
A checked primal value index is outside the request’s ordered values.
Fields
kind: PrimalValueKindOrdered primal collection being accessed.
UndeclaredResidualValue
A checked primal value was not declared as a tensor residual by the rule.
Fields
kind: PrimalValueKindOrdered primal collection being accessed.
ForeignValue
A request or result value belongs to another builder.
Fields
Unsupported
A family-specific rule deliberately rejects this payload.
Fields
role: SemanticAdRuleRoleRejected semantic AD role.
Rule
A family-specific rule failed with a typed source error.
Fields
role: SemanticAdRuleRoleSemantic AD role being evaluated.
Invariant
A family-specific semantic rule invariant was violated.
Fields
role: SemanticAdRuleRoleSemantic AD role being evaluated.
Build(ProgramBuildError)
Semantic-program construction failed inside a rule.
Trait Implementations§
Source§impl Debug for SemanticAdError
impl Debug for SemanticAdError
Source§impl Display for SemanticAdError
impl Display for SemanticAdError
Source§impl Error for SemanticAdError
impl Error for SemanticAdError
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
use the Display impl or to_string()
Source§impl From<ProgramBuildError> for SemanticAdError
impl From<ProgramBuildError> for SemanticAdError
Source§fn from(source: ProgramBuildError) -> Self
fn from(source: ProgramBuildError) -> Self
Source§impl From<SemanticAdError> for SemanticAdTransformError
impl From<SemanticAdError> for SemanticAdTransformError
Source§fn from(source: SemanticAdError) -> Self
fn from(source: SemanticAdError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for SemanticAdError
impl !UnwindSafe for SemanticAdError
impl Freeze for SemanticAdError
impl Send for SemanticAdError
impl Sync for SemanticAdError
impl Unpin for SemanticAdError
impl UnsafeUnpin for SemanticAdError
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
impl<T, U> Imply<T> for U
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