Enum ella_tensor::ShapeError
source · pub enum ShapeError {
Ndim {
expected: usize,
actual: usize,
},
Incompatible(Vec<usize, Global>),
Broadcast(Vec<usize, Global>, Vec<usize, Global>),
ArraySize(usize, Vec<usize, Global>),
}Variants§
Ndim
Incompatible(Vec<usize, Global>)
Broadcast(Vec<usize, Global>, Vec<usize, Global>)
ArraySize(usize, Vec<usize, Global>)
Implementations§
source§impl ShapeError
impl ShapeError
pub fn ndim(expected: usize, actual: usize) -> ShapeError
pub fn incompatible(shape: &[usize]) -> ShapeError
pub fn broadcast(lhs: &[usize], rhs: &[usize]) -> ShapeError
Trait Implementations§
source§impl Debug for ShapeError
impl Debug for ShapeError
source§impl Display for ShapeError
impl Display for ShapeError
source§impl Error for ShapeError
impl Error for ShapeError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<ShapeError> for Error
impl From<ShapeError> for Error
source§fn from(source: ShapeError) -> Error
fn from(source: ShapeError) -> Error
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for ShapeError
impl Send for ShapeError
impl Sync for ShapeError
impl Unpin for ShapeError
impl UnwindSafe for ShapeError
Blanket Implementations§
§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere T: Error + 'static,
§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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