Trait rerun::sdk::ComponentBatch
source · pub trait ComponentBatch: LoggableBatch {
// Required method
fn descriptor(&self) -> Cow<'_, ComponentDescriptor>;
// Provided methods
fn to_arrow_list_array(&self) -> Result<ListArray<i32>, SerializationError> { ... }
fn with_descriptor(
&self,
descriptor: ComponentDescriptor,
) -> ComponentBatchCowWithDescriptor<'_>
where Self: Sized { ... }
fn name(&self) -> ComponentName { ... }
}
Expand description
A ComponentBatch
represents an array’s worth of Component
instances.
Required Methods§
sourcefn descriptor(&self) -> Cow<'_, ComponentDescriptor>
fn descriptor(&self) -> Cow<'_, ComponentDescriptor>
Returns the complete ComponentDescriptor
for this ComponentBatch
.
Every component batch is uniquely identified by its ComponentDescriptor
.
Provided Methods§
sourcefn to_arrow_list_array(&self) -> Result<ListArray<i32>, SerializationError>
fn to_arrow_list_array(&self) -> Result<ListArray<i32>, SerializationError>
Serializes the batch into an Arrow list array with a single component per list.
fn with_descriptor(
&self,
descriptor: ComponentDescriptor,
) -> ComponentBatchCowWithDescriptor<'_>where
Self: Sized,
sourcefn name(&self) -> ComponentName
fn name(&self) -> ComponentName
The fully-qualified name of this component batch, e.g. rerun.components.Position2D
.
This is a trivial but useful helper for self.descriptor().component_name
.
The default implementation already does the right thing. Do not override unless you know
what you’re doing.
Self::name()
must exactly match the value returned by self.descriptor().component_name
,
or undefined behavior ensues.
Trait Implementations§
source§impl AsComponents for dyn ComponentBatch
impl AsComponents for dyn ComponentBatch
source§fn as_component_batches(&self) -> Vec<ComponentBatchCowWithDescriptor<'_>>
fn as_component_batches(&self) -> Vec<ComponentBatchCowWithDescriptor<'_>>
Exposes the object’s contents as a set of
ComponentBatch
s. Read moresource§impl<'a> From<&'a dyn ComponentBatch> for ComponentBatchCow<'a>
impl<'a> From<&'a dyn ComponentBatch> for ComponentBatchCow<'a>
source§fn from(comp_batch: &'a dyn ComponentBatch) -> ComponentBatchCow<'a>
fn from(comp_batch: &'a dyn ComponentBatch) -> ComponentBatchCow<'a>
Converts to this type from the input type.