pub enum SemanticAdError {
CoreOperation,
EffectfulExtension {
family_id: &'static str,
},
MissingRule {
family_id: &'static str,
role: SemanticAdRuleRole,
},
Arity {
field: &'static str,
expected: usize,
actual: 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
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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<ProgramBuildError> for SemanticAdError
impl From<ProgramBuildError> for SemanticAdError
Source§impl From<SemanticAdError> for SemanticAdTransformError
impl From<SemanticAdError> for SemanticAdTransformError
Source§fn from(source: SemanticAdError) -> Self
fn from(source: SemanticAdError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SemanticAdError
impl !RefUnwindSafe for SemanticAdError
impl Send for SemanticAdError
impl Sync for SemanticAdError
impl Unpin for SemanticAdError
impl UnsafeUnpin for SemanticAdError
impl !UnwindSafe 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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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