pub trait VariantStorageBuilder: Send + 'static {
// Required methods
fn as_any_mut(&mut self) -> &mut dyn Any;
fn len(&self) -> usize;
fn finish(self: Box<Self>) -> VortexResult<ArrayRef>;
// Provided method
fn is_empty(&self) -> bool { ... }
}Expand description
Builds the core storage of a Variant in the physical encoding of one storage array.
A VariantBuilder cannot merge the storage it receives, because the canonical Variant
leaves the storage encoding open. A storage encoding that can merge its arrays installs a
builder of its own through VariantBuilder::append_storage instead, so that consecutive
arrays of that encoding finish as one array of it rather than one chunk each.
Required Methods§
Sourcefn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Returns the builder as Any, so that its encoding can recognise it.
Sourcefn finish(self: Box<Self>) -> VortexResult<ArrayRef>
fn finish(self: Box<Self>) -> VortexResult<ArrayRef>
Finishes the storage, an array of the builder’s Variant dtype with one row per appended row.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".