Trait rerun::sdk::LoggableBatch

source ·
pub trait LoggableBatch {
    type Name;

    // Required methods
    fn name(&self) -> Self::Name;
    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 LoggableBatchs (e.g. Vec<dyn LoggableBatch>). This erasability is what makes extending Archetypes 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§

source

fn name(&self) -> Self::Name

The fully-qualified name of this batch, e.g. rerun.datatypes.Vec2D.

source

fn to_arrow(&self) -> Result<Box<dyn Array>, SerializationError>

Serializes the batch into an Arrow array.

Implementations on Foreign Types§

source§

impl<'a, L> LoggableBatch for &'a [L]
where L: Loggable,

§

type Name = <L as Loggable>::Name

source§

fn name(&self) -> <&'a [L] as LoggableBatch>::Name

source§

fn to_arrow(&self) -> Result<Box<dyn Array>, SerializationError>

source§

impl<'a, L> LoggableBatch for &'a [Option<L>]
where L: Loggable,

§

type Name = <L as Loggable>::Name

source§

fn name(&self) -> <&'a [Option<L>] as LoggableBatch>::Name

source§

fn to_arrow(&self) -> Result<Box<dyn Array>, SerializationError>

source§

impl<'a, L, const N: usize> LoggableBatch for &'a [L; N]
where L: Loggable,

source§

impl<'a, L, const N: usize> LoggableBatch for &'a [Option<L>; N]
where L: Loggable,

§

type Name = <L as Loggable>::Name

source§

fn name(&self) -> <&'a [Option<L>; N] as LoggableBatch>::Name

source§

fn to_arrow(&self) -> Result<Box<dyn Array>, SerializationError>

source§

impl<L> LoggableBatch for Option<L>
where L: Clone + Loggable,

source§

impl<L> LoggableBatch for Vec<Option<L>>
where L: Loggable,

source§

impl<L> LoggableBatch for Vec<L>
where L: Clone + Loggable,

source§

impl<L, const N: usize> LoggableBatch for [L; N]
where L: Loggable,

source§

impl<L, const N: usize> LoggableBatch for [Option<L>; N]
where L: Loggable,

§

type Name = <L as Loggable>::Name

source§

fn name(&self) -> <[Option<L>; N] as LoggableBatch>::Name

source§

fn to_arrow(&self) -> Result<Box<dyn Array>, SerializationError>

Implementors§