pub enum ProviderContractError {
WrongOperationFamily {
expected: CoreCapabilityKind,
operation: &'static str,
},
BindingMismatch {
expected: Box<PreparedOperationBinding>,
actual: Box<PreparedOperationBinding>,
},
ProjectionMismatch {
expected: Box<SpecializationProjection>,
actual: Box<SpecializationProjection>,
},
InvalidSpecialization {
source: SpecializationError,
},
NonWideningSpecialization {
previous: Box<SpecializationRequirements>,
next: Box<SpecializationRequirements>,
},
SpecializationRetryLimitExceeded {
attempts: usize,
limit: usize,
},
}Expand description
Reports provider violations of runtime preparation contracts.
§Examples
use tenferro_runtime::{CoreCapabilityKind, ProviderContractError};
let error = ProviderContractError::WrongOperationFamily {
expected: CoreCapabilityKind::Elementwise,
operation: "dot_general",
};
assert!(error.to_string().contains("dot_general"));Variants§
WrongOperationFamily
A provider accepted a request from the wrong core operation family.
Fields
expected: CoreCapabilityKindExpected core capability family.
BindingMismatch
A prepared operation returned a different binding than requested.
Fields
expected: Box<PreparedOperationBinding>Runtime-created binding requested from the provider.
actual: Box<PreparedOperationBinding>Binding returned by the provider.
ProjectionMismatch
A prepared operation returned a different specialization projection.
Fields
expected: Box<SpecializationProjection>Runtime-created projection requested from the provider.
actual: Box<SpecializationProjection>Projection returned by the provider.
InvalidSpecialization
A provider returned an invalid specialization.
Fields
source: SpecializationErrorOriginal specialization failure.
NonWideningSpecialization
A provider requested specialization that did not strictly widen the current requirements.
Fields
previous: Box<SpecializationRequirements>Previous specialization requirements.
next: Box<SpecializationRequirements>Provider-requested specialization requirements.
SpecializationRetryLimitExceeded
A provider exceeded the finite specialization retry bound.
Trait Implementations§
Source§impl Clone for ProviderContractError
impl Clone for ProviderContractError
Source§fn clone(&self) -> ProviderContractError
fn clone(&self) -> ProviderContractError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProviderContractError
impl Debug for ProviderContractError
Source§impl Display for ProviderContractError
impl Display for ProviderContractError
Source§impl Error for ProviderContractError
impl Error for ProviderContractError
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 PartialEq for ProviderContractError
impl PartialEq for ProviderContractError
Source§fn eq(&self, other: &ProviderContractError) -> bool
fn eq(&self, other: &ProviderContractError) -> bool
self and other values to be equal, and is used by ==.impl Eq for ProviderContractError
impl StructuralPartialEq for ProviderContractError
Auto Trait Implementations§
impl Freeze for ProviderContractError
impl RefUnwindSafe for ProviderContractError
impl Send for ProviderContractError
impl Sync for ProviderContractError
impl Unpin for ProviderContractError
impl UnsafeUnpin for ProviderContractError
impl UnwindSafe for ProviderContractError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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