Sometimes you want to go straight from an archetype into a bunch of datacells.
Loading a non RRD file into the viewer is a common example:
- Wrap the file's bytes into an archetype
- Convert the archetype into cells
- Ship the cells to the viewer
It's basically this:
trait Archetype {
// [...]
fn as_data_cells(&self) -> SerializationResult<Vec<DataCell>> {
self.as_component_batches()
.into_iter()
.map(|comp_batch| {
let comp_batch = comp_batch.as_ref();
Ok(DataCell::from_arrow(
comp_batch.name(),
comp_batch.try_to_arrow()?,
))
})
.collect();
}
// [...]
}
but this requires a dependency of re_log_types::DataCell, which is circular.
DataCell gotta move.
Sometimes you want to go straight from an archetype into a bunch of datacells.
Loading a non RRD file into the viewer is a common example:
It's basically this:
but this requires a dependency of
re_log_types::DataCell, which is circular.DataCellgotta move.