pub trait Loggable:
'static
+ Send
+ Sync
+ Clone
+ Sized
+ SizeBytes {
// Provided methods
fn arrow_datatype() -> DataType { ... }
fn arrow2_datatype() -> DataType { ... }
fn to_arrow_opt<'a>(
data: impl IntoIterator<Item = Option<impl Into<Cow<'a, Self>>>>,
) -> SerializationResult<ArrayRef>
where Self: 'a { ... }
fn to_arrow2_opt<'a>(
data: impl IntoIterator<Item = Option<impl Into<Cow<'a, Self>>>>,
) -> SerializationResult<Box<dyn Array>>
where Self: 'a { ... }
fn to_arrow<'a>(
data: impl IntoIterator<Item = impl Into<Cow<'a, Self>>>,
) -> SerializationResult<ArrayRef>
where Self: 'a { ... }
fn to_arrow2<'a>(
data: impl IntoIterator<Item = impl Into<Cow<'a, Self>>>,
) -> SerializationResult<Box<dyn Array>>
where Self: 'a { ... }
fn from_arrow(data: &dyn Array) -> DeserializationResult<Vec<Self>> { ... }
fn from_arrow2(data: &dyn Array) -> DeserializationResult<Vec<Self>> { ... }
fn from_arrow_opt(
data: &dyn Array,
) -> DeserializationResult<Vec<Option<Self>>> { ... }
fn from_arrow2_opt(
data: &dyn Array,
) -> DeserializationResult<Vec<Option<Self>>> { ... }
}Expand description
A Loggable represents a single instance in an array of loggable data.
Internally, Arrow, and by extension Rerun, only deal with arrays of data. We refer to individual entries in these arrays as instances.
A Loggable has no semantics (such as a name, for example): it’s just data.
If you want to encode semantics, then you’re looking for a Component, which extends Loggable.
Implementing the Loggable trait automatically derives the LoggableBatch implementation,
which makes it possible to work with lists’ worth of data in a generic fashion.
Provided Methods§
Sourcefn arrow_datatype() -> DataType
fn arrow_datatype() -> DataType
The underlying arrow::datatypes::DataType, excluding datatype extensions.
Sourcefn arrow2_datatype() -> DataType
fn arrow2_datatype() -> DataType
The underlying arrow2::datatypes::DataType, excluding datatype extensions.
Sourcefn to_arrow_opt<'a>(
data: impl IntoIterator<Item = Option<impl Into<Cow<'a, Self>>>>,
) -> SerializationResult<ArrayRef>where
Self: 'a,
fn to_arrow_opt<'a>(
data: impl IntoIterator<Item = Option<impl Into<Cow<'a, Self>>>>,
) -> SerializationResult<ArrayRef>where
Self: 'a,
Given an iterator of options of owned or reference values to the current
Loggable, serializes them into an Arrow array.
When using Rerun’s builtin components & datatypes, this can only fail if the data exceeds the maximum number of entries in an Arrow array (2^31 for standard arrays, 2^63 for large arrays).
Sourcefn to_arrow2_opt<'a>(
data: impl IntoIterator<Item = Option<impl Into<Cow<'a, Self>>>>,
) -> SerializationResult<Box<dyn Array>>where
Self: 'a,
fn to_arrow2_opt<'a>(
data: impl IntoIterator<Item = Option<impl Into<Cow<'a, Self>>>>,
) -> SerializationResult<Box<dyn Array>>where
Self: 'a,
Given an iterator of options of owned or reference values to the current
Loggable, serializes them into an Arrow2 array.
When using Rerun’s builtin components & datatypes, this can only fail if the data exceeds the maximum number of entries in an Arrow2 array (2^31 for standard arrays, 2^63 for large arrays).
Sourcefn to_arrow<'a>(
data: impl IntoIterator<Item = impl Into<Cow<'a, Self>>>,
) -> SerializationResult<ArrayRef>where
Self: 'a,
fn to_arrow<'a>(
data: impl IntoIterator<Item = impl Into<Cow<'a, Self>>>,
) -> SerializationResult<ArrayRef>where
Self: 'a,
Given an iterator of owned or reference values to the current Loggable, serializes
them into an Arrow array.
When using Rerun’s builtin components & datatypes, this can only fail if the data exceeds the maximum number of entries in an Arrow array (2^31 for standard arrays, 2^63 for large arrays).
Sourcefn to_arrow2<'a>(
data: impl IntoIterator<Item = impl Into<Cow<'a, Self>>>,
) -> SerializationResult<Box<dyn Array>>where
Self: 'a,
fn to_arrow2<'a>(
data: impl IntoIterator<Item = impl Into<Cow<'a, Self>>>,
) -> SerializationResult<Box<dyn Array>>where
Self: 'a,
Given an iterator of owned or reference values to the current Loggable, serializes
them into an Arrow2 array.
When using Rerun’s builtin components & datatypes, this can only fail if the data exceeds the maximum number of entries in an Arrow2 array (2^31 for standard arrays, 2^63 for large arrays).
Sourcefn from_arrow(data: &dyn Array) -> DeserializationResult<Vec<Self>>
fn from_arrow(data: &dyn Array) -> DeserializationResult<Vec<Self>>
Given an Arrow array, deserializes it into a collection of Loggables.
Sourcefn from_arrow2(data: &dyn Array) -> DeserializationResult<Vec<Self>>
fn from_arrow2(data: &dyn Array) -> DeserializationResult<Vec<Self>>
Given an Arrow2 array, deserializes it into a collection of Loggables.
Sourcefn from_arrow_opt(data: &dyn Array) -> DeserializationResult<Vec<Option<Self>>>
fn from_arrow_opt(data: &dyn Array) -> DeserializationResult<Vec<Option<Self>>>
Given an Arrow array, deserializes it into a collection of optional Loggables.
Sourcefn from_arrow2_opt(data: &dyn Array) -> DeserializationResult<Vec<Option<Self>>>
fn from_arrow2_opt(data: &dyn Array) -> DeserializationResult<Vec<Option<Self>>>
Given an Arrow2 array, deserializes it into a collection of optional Loggables.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.