Enum rten_tensor::errors::SliceError
source · pub enum SliceError {
TooManyDims,
InvalidIndex,
InvalidRange,
InvalidStep,
}Expand description
Errors that can occur when slicing a tensor.
Variants§
TooManyDims
The slice spec has more dimensions than the tensor being sliced.
InvalidIndex
An index in the slice spec is out of bounds for the corresponding tensor dimension.
InvalidRange
A range in the slice spec is out of bounds for the corresponding tensor dimension.
InvalidStep
The step in a slice range is negative, in a context where this is not supported.
Trait Implementations§
source§impl Clone for SliceError
impl Clone for SliceError
source§fn clone(&self) -> SliceError
fn clone(&self) -> SliceError
Returns a copy of the value. Read more
1.0.0 · 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 SliceError
impl Debug for SliceError
source§impl Display for SliceError
impl Display for SliceError
source§impl Error for SliceError
impl Error for SliceError
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 SliceError
impl PartialEq for SliceError
impl StructuralPartialEq for SliceError
Auto Trait Implementations§
impl Freeze for SliceError
impl RefUnwindSafe for SliceError
impl Send for SliceError
impl Sync for SliceError
impl Unpin for SliceError
impl UnwindSafe for SliceError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)