pub enum SequenceError {
Show 15 variants
EmptyConstruct,
DtypeMismatch {
op: &'static str,
index: Option<usize>,
expected: DataType,
actual: DataType,
},
IndexOutOfBounds {
op: &'static str,
index: i64,
len: usize,
insertion: bool,
},
EmptyErase,
LengthOverflow {
op: &'static str,
len: usize,
},
InvalidAxis {
op: &'static str,
axis: i64,
rank: usize,
new_axis: bool,
},
InvalidSplit {
op: &'static str,
reason: String,
},
ShapeMismatch {
op: &'static str,
index: usize,
expected: Vec<usize>,
actual: Vec<usize>,
requirement: &'static str,
},
UnsupportedDtype {
op: &'static str,
dtype: DataType,
},
NonHostTensor {
op: &'static str,
index: usize,
device: String,
},
ByteBorrowUnavailable {
shape: Vec<usize>,
device: String,
reason: &'static str,
},
ByteLengthMismatch {
op: &'static str,
dtype: DataType,
shape: Vec<usize>,
expected: usize,
actual: usize,
},
ShapeOverflow {
op: &'static str,
context: &'static str,
shape: Vec<usize>,
},
Allocation {
op: &'static str,
context: &'static str,
bytes: usize,
},
TensorCreation {
op: &'static str,
source: SessionError,
},
}Expand description
A typed failure from an ONNX sequence operation.
Variants§
EmptyConstruct
DtypeMismatch
IndexOutOfBounds
EmptyErase
LengthOverflow
InvalidAxis
InvalidSplit
ShapeMismatch
Fields
UnsupportedDtype
NonHostTensor
ByteLengthMismatch
ShapeOverflow
Allocation
TensorCreation
Trait Implementations§
Source§impl Debug for SequenceError
impl Debug for SequenceError
Source§impl Display for SequenceError
impl Display for SequenceError
Source§impl Error for SequenceError
impl Error for SequenceError
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 From<SequenceError> for SessionError
impl From<SequenceError> for SessionError
Source§fn from(error: SequenceError) -> Self
fn from(error: SequenceError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for SequenceError
impl !UnwindSafe for SequenceError
impl Freeze for SequenceError
impl Send for SequenceError
impl Sync for SequenceError
impl Unpin for SequenceError
impl UnsafeUnpin for SequenceError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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