Trait re_sdk::LoggableBatch
source · pub trait LoggableBatch {
type Name;
// Required methods
fn name(&self) -> Self::Name;
fn num_instances(&self) -> usize;
fn arrow_field(&self) -> Field;
fn to_arrow(&self) -> Result<Box<dyn Array>, SerializationError>;
}
Expand description
A LoggableBatch
represents an array’s worth of Loggable
instances, ready to be
serialized.
LoggableBatch
is carefully designed to be erasable (“object-safe”), so that it is possible
to build heterogeneous collections of LoggableBatch
s (e.g. Vec<dyn LoggableBatch>
).
This erasability is what makes extending Archetype
s possible with little effort.
You should almost never need to implement LoggableBatch
manually, as it is already
blanket implemented for most common use cases (arrays/vectors/slices of loggables, etc).
Required Associated Types§
Required Methods§
sourcefn name(&self) -> Self::Name
fn name(&self) -> Self::Name
The fully-qualified name of this batch, e.g. rerun.datatypes.Vec2D
.
sourcefn num_instances(&self) -> usize
fn num_instances(&self) -> usize
The number of component instances stored into this batch.
sourcefn arrow_field(&self) -> Field
fn arrow_field(&self) -> Field
The underlying arrow2::datatypes::Field
, including datatype extensions.