pub struct VariantMetadataHeader {
version: u8,
is_sorted: bool,
offset_size: OffsetSizeBytes,
}
Fields§
§version: u8
§is_sorted: bool
§offset_size: OffsetSizeBytes
Note: This is offset_size_minus_one
+ 1
Implementations§
Source§impl VariantMetadataHeader
impl VariantMetadataHeader
Sourcepub fn try_new(bytes: &[u8]) -> Result<Self, ArrowError>
pub fn try_new(bytes: &[u8]) -> Result<Self, ArrowError>
Tries to construct the variant metadata header, which has the form 7 6 5 4 3 0 +—––+—+—+—————+ header | | | | version | +—––+—+—+—————+ ^ ^ | +– sorted_strings +– offset_size_minus_one The version is a 4-bit value that must always contain the value 1.
- sorted_strings is a 1-bit value indicating whether dictionary strings are sorted and unique.
- offset_size_minus_one is a 2-bit value providing the number of bytes per dictionary size and offset field.
- The actual number of bytes, offset_size, is offset_size_minus_one + 1
Trait Implementations§
Source§impl Clone for VariantMetadataHeader
impl Clone for VariantMetadataHeader
Source§fn clone(&self) -> VariantMetadataHeader
fn clone(&self) -> VariantMetadataHeader
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for VariantMetadataHeader
impl Debug for VariantMetadataHeader
Source§impl PartialEq for VariantMetadataHeader
impl PartialEq for VariantMetadataHeader
impl Copy for VariantMetadataHeader
impl StructuralPartialEq for VariantMetadataHeader
Auto Trait Implementations§
impl Freeze for VariantMetadataHeader
impl RefUnwindSafe for VariantMetadataHeader
impl Send for VariantMetadataHeader
impl Sync for VariantMetadataHeader
impl Unpin for VariantMetadataHeader
impl UnwindSafe for VariantMetadataHeader
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
Mutably borrows from an owned value. Read more