pub struct SerializedRepDefs {
pub repetition_levels: Option<Arc<[u16]>>,
pub definition_levels: Option<Arc<[u16]>>,
pub def_meaning: Vec<DefinitionInterpretation>,
pub max_visible_level: Option<u16>,
}
Expand description
Represents repetition and definition levels that have been serialized into a pair of (optional) level buffers
Fields§
§repetition_levels: Option<Arc<[u16]>>
The repetition levels, one per item
If None, there are no lists
definition_levels: Option<Arc<[u16]>>
The definition levels, one per item
If None, there are no nulls
def_meaning: Vec<DefinitionInterpretation>
The meaning of each definition level
max_visible_level: Option<u16>
The maximum level that is “visible” from the lowest level
This is the last level before we encounter a list level of some kind. Once we’ve hit a list level then nulls in any level beyond do not map to actual items.
This is None if there are no lists
Implementations§
Source§impl SerializedRepDefs
impl SerializedRepDefs
pub fn new( repetition_levels: Option<LevelBuffer>, definition_levels: Option<LevelBuffer>, def_meaning: Vec<DefinitionInterpretation>, ) -> Self
Sourcepub fn empty(def_meaning: Vec<DefinitionInterpretation>) -> Self
pub fn empty(def_meaning: Vec<DefinitionInterpretation>) -> Self
Creates an empty SerializedRepDefs (no repetition, all valid)
pub fn rep_slicer(&self) -> Option<RepDefSlicer<'_>>
pub fn def_slicer(&self) -> Option<RepDefSlicer<'_>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SerializedRepDefs
impl RefUnwindSafe for SerializedRepDefs
impl Send for SerializedRepDefs
impl Sync for SerializedRepDefs
impl Unpin for SerializedRepDefs
impl UnwindSafe for SerializedRepDefs
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> 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