pub enum DType {
}Expand description
Describes the element type of an array.
Variants§
Bool
Boolean stored as 1 byte (0 or 1).
Int8
Signed 8-bit integer.
Int16
Signed 16-bit integer (little-endian).
Int32
Signed 32-bit integer (little-endian).
Int64
Signed 64-bit integer (little-endian).
UInt8
Unsigned 8-bit integer.
UInt16
Unsigned 16-bit integer (little-endian).
UInt32
Unsigned 32-bit integer (little-endian).
UInt64
Unsigned 64-bit integer (little-endian).
Float32
32-bit IEEE 754 floating point (little-endian).
Float64
64-bit IEEE 754 floating point (little-endian).
String
Variable-length UTF-8 string.
Encoded as an offsets buffer (N + 1 entries) followed by a
concatenated values buffer.
Binary
Variable-length binary data (vlen bytes).
Encoded identically to DType::String but without UTF-8 semantics.
FixedSizeList
Fixed-size list where every element contains exactly size children.
No offsets buffer is needed; child values are stored contiguously.
Fields
List
Variable-length list where each element can have a different number of children.
Encoded with a parent offsets buffer (N + 1 entries) and a concatenated
child values buffer.
TimestampNs
64-bit nanosecond timestamp since the Unix epoch (little-endian).
Byte-identical to DType::Int64 but carries the
“nanoseconds since 1970-01-01 UTC” meaning in the type system.
Implementations§
Source§impl DType
impl DType
Sourcepub fn element_size(&self) -> Option<usize>
pub fn element_size(&self) -> Option<usize>
Returns the byte size of a single element for fixed-width types,
or None for variable-length types.
Sourcepub fn is_variable_length(&self) -> bool
pub fn is_variable_length(&self) -> bool
Returns true if the type requires an offsets buffer
(i.e. it is variable-length).
Trait Implementations§
Source§impl Archive for DType
impl Archive for DType
Source§type Archived = ArchivedDType
type Archived = ArchivedDType
Source§type Resolver = DTypeResolver
type Resolver = DTypeResolver
Source§fn resolve(
&self,
resolver: <Self as Archive>::Resolver,
out: Place<<Self as Archive>::Archived>,
)
fn resolve( &self, resolver: <Self as Archive>::Resolver, out: Place<<Self as Archive>::Archived>, )
Source§const COPY_OPTIMIZATION: CopyOptimization<Self> = _
const COPY_OPTIMIZATION: CopyOptimization<Self> = _
serialize. Read moreimpl StructuralPartialEq for DType
Auto Trait Implementations§
impl Freeze for DType
impl RefUnwindSafe for DType
impl Send for DType
impl Sync for DType
impl Unpin for DType
impl UnsafeUnpin for DType
impl UnwindSafe for DType
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
Source§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
Archive, it may be
unsized. Read moreSource§fn archived_metadata(
&self,
) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
fn archived_metadata( &self, ) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.