Enum BufferSpec
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
Fields
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§
§impl Debug for BufferSpec
impl Debug for BufferSpec
§impl PartialEq for BufferSpec
impl PartialEq for BufferSpec
impl Eq for BufferSpec
impl StructuralPartialEq for BufferSpec
Auto Trait Implementations§
impl Freeze for BufferSpec
impl RefUnwindSafe for BufferSpec
impl Send for BufferSpec
impl Sync for BufferSpec
impl Unpin for BufferSpec
impl UnwindSafe for BufferSpec
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.