pub struct Error { /* private fields */ }Expand description
Error returned by fallible OA operations.
Backend and dependency errors are retained as sources without exposing their concrete types through OA’s public API.
Implementations§
Source§impl Error
impl Error
Sourcepub fn callback(message: impl Into<String>) -> Self
pub fn callback(message: impl Into<String>) -> Self
Construct an application callback failure without losing its message.
Callback implementations may use this when their failure does not already originate from another OA operation.
pub fn invalid_argument(message: impl Into<String>) -> Self
pub fn not_ready(message: impl Into<String>) -> Self
pub fn resource_exhausted(message: impl Into<String>) -> Self
pub fn failed_precondition(message: impl Into<String>) -> Self
pub fn out_of_range(message: impl Into<String>) -> Self
pub fn not_found(message: impl Into<String>) -> Self
pub fn already_exists(message: impl Into<String>) -> Self
pub fn internal(message: impl Into<String>) -> Self
pub fn checkpoint_corrupt(message: impl Into<String>) -> Self
pub fn data_loss(message: impl Into<String>) -> Self
pub fn io(operation: &'static str, source: Error) -> Self
pub fn aborted(message: impl Into<String>) -> Self
pub fn cancelled(message: impl Into<String>) -> Self
pub fn permission_denied(message: impl Into<String>) -> Self
pub fn unimplemented(message: impl Into<String>) -> Self
pub fn unauthenticated(message: impl Into<String>) -> Self
pub fn shape_mismatch(message: impl Into<String>) -> Self
pub fn dtype_mismatch(message: impl Into<String>) -> Self
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + '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 From<AllocError> for Error
impl From<AllocError> for Error
Source§fn from(source: AllocError) -> Self
fn from(source: AllocError) -> Self
Converts to this type from the input type.
Source§impl From<ConstructionError> for Error
impl From<ConstructionError> for Error
Source§fn from(source: ConstructionError) -> Self
fn from(source: ConstructionError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Forget for Error
impl Freeze for Error
impl Move for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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