#[non_exhaustive]pub enum SafetyNetError {
Unavailable {
reason: String,
},
WeightsMissing {
path: String,
},
ModelUnavailable {
reason: String,
},
InputTooLarge {
limit: usize,
actual: usize,
},
Runtime {
message: String,
},
InvalidOutput {
message: String,
},
}Expand description
Exhaustive, closed error set for safety-net execution.
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.
Safety net was explicitly requested but is unavailable.
WeightsMissing
Required model weights or checkpoint are missing.
Backend model could not be loaded or reached.
InputTooLarge
Input exceeded configured backend limit.
Runtime
Backend runtime failed.
InvalidOutput
Backend returned invalid output.
Trait Implementations§
Source§impl Clone for SafetyNetError
impl Clone for SafetyNetError
Source§fn clone(&self) -> SafetyNetError
fn clone(&self) -> SafetyNetError
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 SafetyNetError
impl Debug for SafetyNetError
Source§impl Display for SafetyNetError
impl Display for SafetyNetError
Source§impl Error for SafetyNetError
impl Error for SafetyNetError
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 SafetyNetError
impl PartialEq for SafetyNetError
Source§fn eq(&self, other: &SafetyNetError) -> bool
fn eq(&self, other: &SafetyNetError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for SafetyNetError
impl StructuralPartialEq for SafetyNetError
Auto Trait Implementations§
impl Freeze for SafetyNetError
impl RefUnwindSafe for SafetyNetError
impl Send for SafetyNetError
impl Sync for SafetyNetError
impl Unpin for SafetyNetError
impl UnsafeUnpin for SafetyNetError
impl UnwindSafe for SafetyNetError
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