#[non_exhaustive]pub enum InputIngressContractError {
ResidencyMismatch {
input_slot: usize,
ingress_engine_id: EngineId,
ingress_storage_class: StorageClass,
placement: Placement,
backend_family: Option<&'static str>,
allocation_domain: Option<AllocationDomainId>,
},
}Expand description
Reports a runtime input that violates a prepared ingress contract.
§Examples
use tenferro_runtime::{EngineId, InputIngressContractError, StorageClass};
use tenferro_tensor::Placement;
let error = InputIngressContractError::ResidencyMismatch {
input_slot: 0,
ingress_engine_id: EngineId::new("tenferro.cpu")?,
ingress_storage_class: StorageClass::new("tenferro.storage.host")?,
placement: Placement::default(),
backend_family: Some("foreign-backend"),
allocation_domain: None,
};
assert!(error.to_string().contains("input slot 0"));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.
ResidencyMismatch
A runtime input’s physical residency is incompatible with its prepared ingress.
Fields
§
ingress_storage_class: StorageClassStorage class selected as the prepared input ingress.
§
allocation_domain: Option<AllocationDomainId>Physical allocation domain reported by the input.
Trait Implementations§
Source§impl Debug for InputIngressContractError
impl Debug for InputIngressContractError
Source§impl Display for InputIngressContractError
impl Display for InputIngressContractError
Source§impl Error for InputIngressContractError
impl Error for InputIngressContractError
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()
Auto Trait Implementations§
impl Freeze for InputIngressContractError
impl RefUnwindSafe for InputIngressContractError
impl Send for InputIngressContractError
impl Sync for InputIngressContractError
impl Unpin for InputIngressContractError
impl UnsafeUnpin for InputIngressContractError
impl UnwindSafe for InputIngressContractError
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