pub struct CharArray {
pub data: Vec<char>,
pub shape: Vec<usize>,
pub rows: usize,
pub cols: usize,
}Fields§
§data: Vec<char>§shape: Vec<usize>Full MATLAB-visible shape vector. Character payloads retain their historical row-major layout within each 2-D page.
rows: usizeCached row count for 2-D interop; equals shape[0] when present.
cols: usizeCached column count for 2-D interop; equals shape[1] when present,
otherwise 1 (or 0 for an empty shape).
Implementations§
Source§impl CharArray
impl CharArray
pub fn new_row(s: &str) -> Self
pub fn new(data: Vec<char>, rows: usize, cols: usize) -> Result<Self, String>
pub fn new_with_shape( data: Vec<char>, shape: Vec<usize>, ) -> Result<Self, String>
pub fn from_column_major( data: Vec<char>, shape: Vec<usize>, ) -> Result<Self, String>
pub fn to_column_major(&self) -> Vec<char>
pub fn shape(&self) -> &[usize]
Sourcepub fn row_string(&self) -> Option<String>
pub fn row_string(&self) -> Option<String>
Return the character contents when this value is a MATLAB character
row vector. Display intentionally renders arrays for the console and
therefore includes layout whitespace; semantic string conversions must
use this method instead.
Trait Implementations§
impl StructuralPartialEq for CharArray
Auto Trait Implementations§
impl Freeze for CharArray
impl RefUnwindSafe for CharArray
impl Send for CharArray
impl Sync for CharArray
impl Unpin for CharArray
impl UnsafeUnpin for CharArray
impl UnwindSafe for CharArray
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