#[non_exhaustive]pub enum AdAdmissionError {
UnsupportedAdOrder {
order: u32,
},
NonFieldScalar,
AdRuleUnavailable,
}Expand description
Why a scalar may not be differentiated at the requested order.
This is the query result of ad_admission; it never represents a gradient.
§Examples
use tenferro_tensor_core::{ad_admission, AdAdmissionError};
assert_eq!(
ad_admission::<f64>(2),
Err(AdAdmissionError::UnsupportedAdOrder { order: 2 })
);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnsupportedAdOrder
Only first-order differentiation is admitted for a non-preset scalar.
NonFieldScalar
The scalar’s arithmetic is not a field, so the canonical field derivative rules do not apply.
The scalar is admissible in principle, but no derivative rules exist for it in this build.
Trait Implementations§
Source§impl Clone for AdAdmissionError
impl Clone for AdAdmissionError
Source§fn clone(&self) -> AdAdmissionError
fn clone(&self) -> AdAdmissionError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AdAdmissionError
impl Debug for AdAdmissionError
Source§impl Display for AdAdmissionError
impl Display for AdAdmissionError
impl Eq for AdAdmissionError
Source§impl Error for AdAdmissionError
impl Error for AdAdmissionError
1.30.0 · 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 PartialEq for AdAdmissionError
impl PartialEq for AdAdmissionError
impl StructuralPartialEq for AdAdmissionError
Auto Trait Implementations§
impl Freeze for AdAdmissionError
impl RefUnwindSafe for AdAdmissionError
impl Send for AdAdmissionError
impl Sync for AdAdmissionError
impl Unpin for AdAdmissionError
impl UnsafeUnpin for AdAdmissionError
impl UnwindSafe for AdAdmissionError
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