pub struct VariantMetadata<'m> {
bytes: &'m [u8],
header: VariantMetadataHeader,
dict_size: usize,
dictionary_key_start_byte: usize,
}
Expand description
Encodes the Variant Metadata, see the Variant spec file for more information
Fields§
§bytes: &'m [u8]
§header: VariantMetadataHeader
§dict_size: usize
§dictionary_key_start_byte: usize
Implementations§
Source§impl<'m> VariantMetadata<'m>
impl<'m> VariantMetadata<'m>
Sourcepub const fn as_bytes(&self) -> &'m [u8] ⓘ
pub const fn as_bytes(&self) -> &'m [u8] ⓘ
View the raw bytes (needed by very low-level decoders)
pub fn try_new(bytes: &'m [u8]) -> Result<Self, ArrowError>
Sourcepub fn dictionary_size(&self) -> usize
pub fn dictionary_size(&self) -> usize
Get the dictionary size
pub fn version(&self) -> u8
Sourcefn get_offsets_for_key_by(
&self,
index: usize,
) -> Result<Range<usize>, ArrowError>
fn get_offsets_for_key_by( &self, index: usize, ) -> Result<Range<usize>, ArrowError>
Helper method to get the offset start and end range for a key by index.
Sourcepub fn get_offset_by(&self, index: usize) -> Result<usize, ArrowError>
pub fn get_offset_by(&self, index: usize) -> Result<usize, ArrowError>
Get a single offset by index
Sourcepub fn get_field_by(&self, index: usize) -> Result<&'m str, ArrowError>
pub fn get_field_by(&self, index: usize) -> Result<&'m str, ArrowError>
Get the key-name by index
Sourcepub(crate) fn get_field_by_offset(
&self,
offset: Range<usize>,
) -> Result<&'m str, ArrowError>
pub(crate) fn get_field_by_offset( &self, offset: Range<usize>, ) -> Result<&'m str, ArrowError>
Gets the field using an offset (Range) - helper method to keep consistent API.
pub fn header(&self) -> VariantMetadataHeader
Trait Implementations§
Source§impl<'m> Clone for VariantMetadata<'m>
impl<'m> Clone for VariantMetadata<'m>
Source§fn clone(&self) -> VariantMetadata<'m>
fn clone(&self) -> VariantMetadata<'m>
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<'m> Debug for VariantMetadata<'m>
impl<'m> Debug for VariantMetadata<'m>
Source§impl<'m> PartialEq for VariantMetadata<'m>
impl<'m> PartialEq for VariantMetadata<'m>
impl<'m> Copy for VariantMetadata<'m>
impl<'m> StructuralPartialEq for VariantMetadata<'m>
Auto Trait Implementations§
impl<'m> Freeze for VariantMetadata<'m>
impl<'m> RefUnwindSafe for VariantMetadata<'m>
impl<'m> Send for VariantMetadata<'m>
impl<'m> Sync for VariantMetadata<'m>
impl<'m> Unpin for VariantMetadata<'m>
impl<'m> UnwindSafe for VariantMetadata<'m>
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