Expand description
Sealed traits and implementations to handle all physical types used in this crate.
Most physical types used in this crate are native Rust types, such as i32.
The trait NativeType describes the interfaces required by this crate to be conformant
with Arrow.
Every implementation of NativeType has an associated variant in PrimitiveType,
available via NativeType::PRIMITIVE.
Combined, these allow structs generic over NativeType to be trait objects downcastable
to concrete implementations based on the matched NativeType::PRIMITIVE variant.
Another important trait in this module is Offset, the subset of NativeType that can
be used in Arrow offsets (i32 and i64).
Another important trait in this module is BitChunk, describing types that can be used to
represent chunks of bits (e.g. 8 bits via u8, 16 via u16), and BitChunkIter,
that can be used to iterate over bitmaps in BitChunks according to
Arrow’s definition of bitmaps.
Structs§
- BitChunk
Iter - An [
Iterator<Item=bool>] over aBitChunk. - BitChunk
Ones - An [
Iterator<Item=usize>] over aBitChunkreturning the index of each bit set in the chunk See https://lemire.me/blog/2018/03/08/iterating-over-set-bits-quickly-simd-edition/ for details - Bytes1
Alignment1 - Bytes with a size and alignment.
- Bytes2
Alignment2 - Bytes with a size and alignment.
- Bytes4
Alignment4 - Bytes with a size and alignment.
- Bytes8
Alignment4 - Bytes with a size and alignment.
- Bytes8
Alignment8 - Bytes with a size and alignment.
- Bytes12
Alignment4 - Bytes with a size and alignment.
- Bytes16
Alignment4 - Bytes with a size and alignment.
- Bytes16
Alignment8 - Bytes with a size and alignment.
- Bytes16
Alignment16 - Bytes with a size and alignment.
- Bytes32
Alignment16 - Bytes with a size and alignment.
- Index
Range - Range of
Index, equivalent to(a..b).Stepis unstable in Rust, which does not allow us to implement (a..b) forIndex. - days_ms
- The in-memory representation of the DayMillisecond variant of arrow’s “Interval” logical type.
- f16
- Type representation of the Float16 physical type
- i256
- Physical representation of a decimal
- months_
days_ ns - The in-memory representation of the MonthDayNano variant of the “Interval” logical type.
Enums§
- Primitive
Size Alignment Pair - Primitive
Type - The set of all implementations of the sealed trait
NativeType.
Traits§
- Aligned
Bytes - A representation of a type as raw bytes with the same alignment as the original type.
- Aligned
Bytes Cast - Define that a type has the same byte alignment and size as
B. - BitChunk
- A chunk of bits. This is used to create masks of a given length
whose width is
1bit. Inportable_simdnotation, this corresponds tom1xY. - Index
- Sealed trait describing the subset of
NativeType(i32,i64,u32andu64) that can be used to index a slot of an array. - Native
Type - Sealed trait implemented by all physical types that can be allocated, serialized and deserialized by this crate. All O(N) allocations in this crate are done for this trait alone.
- Offset
- Sealed trait describing the subset (
i32andi64) ofIndexthat can be used as offsets of variable-length Arrow arrays.
Functions§
- canonical_
f16 - Converts an f32 into a canonical form, where -0 == 0 and all NaNs map to the same value.