Enum arrow_data::BufferSpec
source · pub enum BufferSpec {
FixedWidth {
byte_width: usize,
alignment: usize,
},
VariableWidth,
BitMap,
AlwaysNull,
}
Expand description
Layout specification for a single data type buffer
Variants§
FixedWidth
Each element is a fixed width primitive, with the given byte_width
and alignment
alignment
is the alignment required by Rust for an array of the corresponding primitive,
see Layout::array
and std::mem::align_of
.
Arrow-rs requires that all buffers have at least this alignment, to allow for
slice based APIs. Alignment in excess of this is not required to allow
for array slicing and interoperability with Vec
, which cannot be over-aligned.
Note that these alignment requirements will vary between architectures
VariableWidth
Variable width, such as string data for utf8 data
BitMap
Buffer holds a bitmap.
Note: Unlike the C++ implementation, the null/validity buffer is handled specially rather than as another of the buffers in the spec, so this variant is only used for the Boolean type.
AlwaysNull
Buffer is always null. Unused currently in Rust implementation, (used in C++ for Union type)
Trait Implementations§
source§impl Debug for BufferSpec
impl Debug for BufferSpec
source§impl PartialEq<BufferSpec> for BufferSpec
impl PartialEq<BufferSpec> for BufferSpec
source§fn eq(&self, other: &BufferSpec) -> bool
fn eq(&self, other: &BufferSpec) -> bool
self
and other
values to be equal, and is used
by ==
.