pub enum DefinitionInterpretation {
AllValidItem,
AllValidList,
NullableItem,
NullableList,
EmptyableList,
NullableAndEmptyableList,
}
Expand description
This tells us how an array handles definition. Given a stack of these and a nested array and a set of definition levels we can calculate how we should interpret the definition levels.
For example, if the interpretation is [AllValidItem, NullableItem] then a 0 means “valid item” and a 1 means “null struct”. If the interpretation is [NullableItem, NullableItem] then a 0 means “valid item” and a 1 means “null item” and a 2 means “null struct”.
Lists are tricky because we might use up to two definition levels for a single layer of list nesting because we need one value to indicate “empty list” and another value to indicate “null list”.
Variants§
Implementations§
Source§impl DefinitionInterpretation
impl DefinitionInterpretation
Sourcepub fn num_def_levels(&self) -> u16
pub fn num_def_levels(&self) -> u16
How many definition levels do we need for this layer
Sourcepub fn is_all_valid(&self) -> bool
pub fn is_all_valid(&self) -> bool
Does this layer have nulls?
Trait Implementations§
Source§impl Clone for DefinitionInterpretation
impl Clone for DefinitionInterpretation
Source§fn clone(&self) -> DefinitionInterpretation
fn clone(&self) -> DefinitionInterpretation
Returns a copy 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 DefinitionInterpretation
impl Debug for DefinitionInterpretation
Source§impl PartialEq for DefinitionInterpretation
impl PartialEq for DefinitionInterpretation
impl Copy for DefinitionInterpretation
impl Eq for DefinitionInterpretation
impl StructuralPartialEq for DefinitionInterpretation
Auto Trait Implementations§
impl Freeze for DefinitionInterpretation
impl RefUnwindSafe for DefinitionInterpretation
impl Send for DefinitionInterpretation
impl Sync for DefinitionInterpretation
impl Unpin for DefinitionInterpretation
impl UnwindSafe for DefinitionInterpretation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more