pub(crate) struct VariantMetadataHeader {
version: u8,
is_sorted: bool,
offset_size: OffsetSizeBytes,
}
Expand description
Header structure for VariantMetadata
Fields§
§version: u8
§is_sorted: bool
§offset_size: OffsetSizeBytes
Note: This is offset_size_minus_one
+ 1
Implementations§
Source§impl VariantMetadataHeader
impl VariantMetadataHeader
const fn offset_size(&self) -> u32
const fn first_offset_byte(&self) -> u32
Sourcepub(crate) fn try_new(header_byte: u8) -> Result<Self, ArrowError>
pub(crate) fn try_new(header_byte: 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