#[non_exhaustive]pub enum MatValue {
Numeric {
class: MatClass,
dims: Vec<usize>,
real: Vec<f64>,
imag: Option<Vec<f64>>,
},
Logical {
dims: Vec<usize>,
data: Vec<bool>,
},
Char {
dims: Vec<usize>,
chars: Vec<char>,
},
Sparse {
nrows: usize,
ncols: usize,
row_indices: Vec<usize>,
col_ptr: Vec<usize>,
real: Vec<f64>,
imag: Option<Vec<f64>>,
logical: bool,
},
Cell {
dims: Vec<usize>,
cells: Vec<MatValue>,
},
Struct {
dims: Vec<usize>,
fields: Vec<String>,
elements: Vec<Vec<MatValue>>,
},
}Expand description
A MATLAB value. Arrays are column-major with their MATLAB dimensions (at least two).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Numeric
A numeric array; values converted to f64 (64-bit integers beyond 2⁵³ lose precision).
Logical
A logical array.
Char
A character array, column-major; a row vector reads as a string with MatValue::as_string.
Sparse
A sparse matrix in compressed sparse column form: row indices, column pointers (length
ncols + 1) and values.
Fields
Cell
A cell array of values, column-major.
Struct
A structure array: field names, and for each element (column-major) one value per field.
Implementations§
Trait Implementations§
impl StructuralPartialEq for MatValue
Auto Trait Implementations§
impl Freeze for MatValue
impl RefUnwindSafe for MatValue
impl Send for MatValue
impl Sync for MatValue
impl Unpin for MatValue
impl UnsafeUnpin for MatValue
impl UnwindSafe for MatValue
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