#[non_exhaustive]pub enum EngineExecutionContractError {
OutputResidencyMismatch {
instruction_index: usize,
output_slot: usize,
engine_id: EngineId,
storage_class: StorageClass,
backend_family: Option<&'static str>,
allocation_domain: Option<AllocationDomainId>,
},
}Expand description
Reports a runtime execution bridge that violated its output contract.
§Examples
use tenferro_runtime::{EngineExecutionContractError, EngineId, StorageClass};
let error = EngineExecutionContractError::OutputResidencyMismatch {
instruction_index: 3,
output_slot: 7,
engine_id: EngineId::new("tenferro.cpu")?,
storage_class: StorageClass::new("tenferro.storage.host")?,
backend_family: Some("foreign-backend"),
allocation_domain: None,
};
assert!(error.to_string().contains("output slot 7"));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.
OutputResidencyMismatch
An executor returned a tensor not owned by its scheduled engine/storage.
Fields
§
storage_class: StorageClassStorage class selected by the prepared schedule.
§
allocation_domain: Option<AllocationDomainId>Physical allocation domain reported by the tensor.
Trait Implementations§
Source§impl Debug for EngineExecutionContractError
impl Debug for EngineExecutionContractError
Source§impl Error for EngineExecutionContractError
impl Error for EngineExecutionContractError
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 EngineExecutionContractError
impl RefUnwindSafe for EngineExecutionContractError
impl Send for EngineExecutionContractError
impl Sync for EngineExecutionContractError
impl Unpin for EngineExecutionContractError
impl UnsafeUnpin for EngineExecutionContractError
impl UnwindSafe for EngineExecutionContractError
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