pub enum ErrorKind {
InternalError(ErrorCode),
SizeMismatch {
expected: usize,
got: usize,
},
TensorCopyFailed(i32),
IOError,
InterpreterError,
AsciiError,
HalideTypeMismatch {
got: &'static str,
},
ParseError,
SyncError,
TensorError,
DynamicTensorError,
}Expand description
Error types for MNN
Variants§
InternalError(ErrorCode)
Internal error (from MNN library)
SizeMismatch
Mismatching Size for input
TensorCopyFailed(i32)
Failed to copy tensor
IOError
I/O Error
InterpreterError
Interpreter Error
AsciiError
ASCII Error (path, name, etc had invalid characters)
HalideTypeMismatch
HalideType mismatch (e.g. trying to convert from a float tensor to an int tensor)
ParseError
Failed to parse the Argument
SyncError
Error with mnn-sync crate
TensorError
Error with some tensor
DynamicTensorError
Tried to run a dynamic tensor without resizing it first
Trait Implementations§
Source§impl Error for ErrorKind
impl Error for ErrorKind
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 ErrorKind
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnsafeUnpin for ErrorKind
impl UnwindSafe for ErrorKind
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