pub enum ColumnView<'a> {
Float(ArrayBase<ViewRepr<&'a f64>, Dim<IxDynImpl>>),
Int(ArrayBase<ViewRepr<&'a i32>, Dim<IxDynImpl>>),
Bool(ArrayBase<ViewRepr<&'a bool>, Dim<IxDynImpl>>),
UInt(ArrayBase<ViewRepr<&'a u32>, Dim<IxDynImpl>>),
U8(ArrayBase<ViewRepr<&'a u8>, Dim<IxDynImpl>>),
String(ArrayBase<ViewRepr<&'a String>, Dim<IxDynImpl>>),
}Expand description
A borrowed, read-only view of a Column.
Each variant holds an ArrayViewD that borrows from the corresponding
ArrayD inside an owned Column. No data is copied.
Variants§
Float(ArrayBase<ViewRepr<&'a f64>, Dim<IxDynImpl>>)
Borrowed float column.
Int(ArrayBase<ViewRepr<&'a i32>, Dim<IxDynImpl>>)
Borrowed signed integer column.
Bool(ArrayBase<ViewRepr<&'a bool>, Dim<IxDynImpl>>)
Borrowed boolean column.
UInt(ArrayBase<ViewRepr<&'a u32>, Dim<IxDynImpl>>)
Borrowed unsigned integer column.
U8(ArrayBase<ViewRepr<&'a u8>, Dim<IxDynImpl>>)
Borrowed u8 column.
String(ArrayBase<ViewRepr<&'a String>, Dim<IxDynImpl>>)
Borrowed string column.
Implementations§
Source§impl<'a> ColumnView<'a>
impl<'a> ColumnView<'a>
Sourcepub fn nrows(&self) -> Option<usize>
pub fn nrows(&self) -> Option<usize>
Returns the number of rows (axis-0 length) of this column view.
Returns None if the array has rank 0.
Sourcepub fn as_float(&self) -> Option<ArrayBase<ViewRepr<&'a f64>, Dim<IxDynImpl>>>
pub fn as_float(&self) -> Option<ArrayBase<ViewRepr<&'a f64>, Dim<IxDynImpl>>>
Returns a view of the float data, or None if this column view is not Float.
Sourcepub fn as_int(&self) -> Option<ArrayBase<ViewRepr<&'a i32>, Dim<IxDynImpl>>>
pub fn as_int(&self) -> Option<ArrayBase<ViewRepr<&'a i32>, Dim<IxDynImpl>>>
Returns a view of the integer data, or None if not Int.
Sourcepub fn as_bool(&self) -> Option<ArrayBase<ViewRepr<&'a bool>, Dim<IxDynImpl>>>
pub fn as_bool(&self) -> Option<ArrayBase<ViewRepr<&'a bool>, Dim<IxDynImpl>>>
Returns a view of the boolean data, or None if not Bool.
Sourcepub fn as_uint(&self) -> Option<ArrayBase<ViewRepr<&'a u32>, Dim<IxDynImpl>>>
pub fn as_uint(&self) -> Option<ArrayBase<ViewRepr<&'a u32>, Dim<IxDynImpl>>>
Returns a view of the unsigned integer data, or None if not UInt.
Sourcepub fn as_u8(&self) -> Option<ArrayBase<ViewRepr<&'a u8>, Dim<IxDynImpl>>>
pub fn as_u8(&self) -> Option<ArrayBase<ViewRepr<&'a u8>, Dim<IxDynImpl>>>
Returns a view of the u8 data, or None if not U8.
Trait Implementations§
Source§impl ColumnAccess for ColumnView<'_>
impl ColumnAccess for ColumnView<'_>
Source§fn as_float_view(&self) -> Option<ArrayBase<ViewRepr<&f64>, Dim<IxDynImpl>>>
fn as_float_view(&self) -> Option<ArrayBase<ViewRepr<&f64>, Dim<IxDynImpl>>>
Returns a float array view, or
None if the column is not Float.Source§fn as_int_view(&self) -> Option<ArrayBase<ViewRepr<&i32>, Dim<IxDynImpl>>>
fn as_int_view(&self) -> Option<ArrayBase<ViewRepr<&i32>, Dim<IxDynImpl>>>
Returns an int array view, or
None if the column is not Int.Source§fn as_bool_view(&self) -> Option<ArrayBase<ViewRepr<&bool>, Dim<IxDynImpl>>>
fn as_bool_view(&self) -> Option<ArrayBase<ViewRepr<&bool>, Dim<IxDynImpl>>>
Returns a bool array view, or
None if the column is not Bool.Source§fn as_uint_view(&self) -> Option<ArrayBase<ViewRepr<&u32>, Dim<IxDynImpl>>>
fn as_uint_view(&self) -> Option<ArrayBase<ViewRepr<&u32>, Dim<IxDynImpl>>>
Returns a uint array view, or
None if the column is not UInt.Source§fn as_u8_view(&self) -> Option<ArrayBase<ViewRepr<&u8>, Dim<IxDynImpl>>>
fn as_u8_view(&self) -> Option<ArrayBase<ViewRepr<&u8>, Dim<IxDynImpl>>>
Returns a u8 array view, or
None if the column is not U8.Source§fn as_string_view(&self) -> Option<ArrayBase<ViewRepr<&String>, Dim<IxDynImpl>>>
fn as_string_view(&self) -> Option<ArrayBase<ViewRepr<&String>, Dim<IxDynImpl>>>
Returns a string array view, or
None if the column is not String.Source§impl Debug for ColumnView<'_>
impl Debug for ColumnView<'_>
Source§impl<'a> From<&'a Column> for ColumnView<'a>
impl<'a> From<&'a Column> for ColumnView<'a>
Source§fn from(col: &'a Column) -> ColumnView<'a>
fn from(col: &'a Column) -> ColumnView<'a>
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for ColumnView<'a>
impl<'a> RefUnwindSafe for ColumnView<'a>
impl<'a> Send for ColumnView<'a>
impl<'a> Sync for ColumnView<'a>
impl<'a> Unpin for ColumnView<'a>
impl<'a> UnsafeUnpin for ColumnView<'a>
impl<'a> UnwindSafe for ColumnView<'a>
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