pub struct ShapeError { /* private fields */ }
Expand description
The error type for any shape errors
Implementations§
Source§impl ShapeError
impl ShapeError
Sourcepub fn new(shape: (usize, usize), expected_shape: (usize, usize)) -> ShapeError
pub fn new(shape: (usize, usize), expected_shape: (usize, usize)) -> ShapeError
Create a new ShapeError
given the shape of the matrix and the expected shape
Sourcepub fn new_rows_error(rows: usize, expected_rows: usize) -> ShapeError
pub fn new_rows_error(rows: usize, expected_rows: usize) -> ShapeError
Create a new ShapeError
given the rows of the matrix and the expected rows
Sourcepub fn new_cols_error(cols: usize, expected_cols: usize) -> ShapeError
pub fn new_cols_error(cols: usize, expected_cols: usize) -> ShapeError
Create a new ShapeError
given the columns of the matrix and the expected columns
Trait Implementations§
Source§impl Clone for ShapeError
impl Clone for ShapeError
Source§fn clone(&self) -> ShapeError
fn clone(&self) -> ShapeError
Returns a duplicate 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 ShapeError
impl Debug for ShapeError
Auto Trait Implementations§
impl Freeze for ShapeError
impl RefUnwindSafe for ShapeError
impl Send for ShapeError
impl Sync for ShapeError
impl Unpin for ShapeError
impl UnwindSafe for ShapeError
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