pub struct CharacterMatrix { /* private fields */ }Expand description
A validated, owned view of an R character matrix.
Matrix cells are stored in row-major order. An R NA cell is represented
by the inner None returned from CharacterMatrix::get, while an
out-of-bounds lookup is represented by the outer None.
Implementations§
Source§impl CharacterMatrix
impl CharacterMatrix
Sourcepub fn from_object(object: &RObject) -> Result<Self, ViewError>
pub fn from_object(object: &RObject) -> Result<Self, ViewError>
Validates and copies an R character matrix.
Sourcepub fn get(&self, row: usize, column: usize) -> Option<Option<&str>>
pub fn get(&self, row: usize, column: usize) -> Option<Option<&str>>
Returns a cell, distinguishing an out-of-bounds lookup from an R NA.
Sourcepub fn row_name(&self, row: usize) -> Option<&str>
pub fn row_name(&self, row: usize) -> Option<&str>
Returns a row name, or None if it is absent, NA, or out of bounds.
Sourcepub fn column_name(&self, column: usize) -> Option<&str>
pub fn column_name(&self, column: usize) -> Option<&str>
Returns a column name, or None if it is absent, NA, or out of bounds.
Trait Implementations§
Source§impl Clone for CharacterMatrix
impl Clone for CharacterMatrix
Source§impl Debug for CharacterMatrix
impl Debug for CharacterMatrix
impl Eq for CharacterMatrix
Source§impl PartialEq for CharacterMatrix
impl PartialEq for CharacterMatrix
impl StructuralPartialEq for CharacterMatrix
Auto Trait Implementations§
impl Freeze for CharacterMatrix
impl RefUnwindSafe for CharacterMatrix
impl Send for CharacterMatrix
impl Sync for CharacterMatrix
impl Unpin for CharacterMatrix
impl UnsafeUnpin for CharacterMatrix
impl UnwindSafe for CharacterMatrix
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