pub enum Column {
I8(Arc<[i8]>),
U8(Arc<[u8]>),
I16(Arc<[i16]>),
U16(Arc<[u16]>),
I32(Arc<[i32]>),
U32(Arc<[u32]>),
I64(Arc<[i64]>),
U64(Arc<[u64]>),
}Expand description
An immutable exact row-data column.
Unlike floating-point expression scalars, these values never pass through floating-point storage or runtime precision conversion.
Variants§
I8(Arc<[i8]>)
An immutable int8 buffer.
U8(Arc<[u8]>)
An immutable uint8 buffer.
I16(Arc<[i16]>)
An immutable int16 buffer.
U16(Arc<[u16]>)
An immutable uint16 buffer.
I32(Arc<[i32]>)
An immutable int32 buffer.
U32(Arc<[u32]>)
An immutable uint32 buffer.
I64(Arc<[i64]>)
An immutable int64 buffer.
U64(Arc<[u64]>)
An immutable uint64 buffer.
Implementations§
Source§impl Column
impl Column
Sourcepub fn dtype(&self) -> ColumnDType
pub fn dtype(&self) -> ColumnDType
Returns the exact storage dtype.
Sourcepub fn at(&self, row: usize) -> ColumnValue
pub fn at(&self, row: usize) -> ColumnValue
Sourcepub fn append_le_bytes(&self, output: &mut Vec<u8>)
pub fn append_le_bytes(&self, output: &mut Vec<u8>)
Appends exact little-endian values to a transport buffer.
Sourcepub fn from_le_bytes(dtype: ColumnDType, bytes: &[u8]) -> LadduDataResult<Self>
pub fn from_le_bytes(dtype: ColumnDType, bytes: &[u8]) -> LadduDataResult<Self>
Decodes a buffer of exact little-endian values.
§Errors
Returns an error if the byte count is not a multiple of the dtype width.
Source§impl Column
impl Column
Sourcepub fn empty(dtype: ColumnDType) -> Self
pub fn empty(dtype: ColumnDType) -> Self
Creates a correctly typed empty column.
Sourcepub fn concat(dtype: ColumnDType, columns: &[&Self]) -> LadduDataResult<Self>
pub fn concat(dtype: ColumnDType, columns: &[&Self]) -> LadduDataResult<Self>
Concatenates columns of one exact dtype.
§Errors
Returns an error if any column has a different dtype.
Trait Implementations§
impl Eq for Column
impl StructuralPartialEq for Column
Auto Trait Implementations§
impl Freeze for Column
impl RefUnwindSafe for Column
impl Send for Column
impl Sync for Column
impl Unpin for Column
impl UnsafeUnpin for Column
impl UnwindSafe for Column
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.