#![doc = document_features::document_features!()]
#![allow(clippy::unwrap_used)]
pub const DEFAULT_DISPLAY_DECIMALS: usize = 3;
pub trait AsComponents {
fn as_component_batches(&self) -> Vec<MaybeOwnedComponentBatch<'_>>;
#[inline]
fn to_arrow(
&self,
) -> SerializationResult<Vec<(::arrow2::datatypes::Field, Box<dyn ::arrow2::array::Array>)>>
{
self.as_component_batches()
.into_iter()
.map(|comp_batch| {
comp_batch
.as_ref()
.to_arrow()
.map(|array| (comp_batch.as_ref().arrow_field(), array))
.with_context(comp_batch.as_ref().name())
})
.collect()
}
}
mod archetype;
mod arrow_buffer;
mod arrow_string;
mod loggable;
mod loggable_batch;
pub mod reflection;
mod result;
mod size_bytes;
mod tuid;
mod view;
pub use self::{
archetype::{
Archetype, ArchetypeName, ArchetypeReflectionMarker, GenericIndicatorComponent,
NamedIndicatorComponent,
},
arrow_buffer::ArrowBuffer,
arrow_string::ArrowString,
loggable::{Component, ComponentName, ComponentNameSet, Datatype, DatatypeName, Loggable},
loggable_batch::{ComponentBatch, DatatypeBatch, LoggableBatch, MaybeOwnedComponentBatch},
result::{
DeserializationError, DeserializationResult, ResultExt, SerializationError,
SerializationResult, _Backtrace,
},
size_bytes::SizeBytes,
view::{SpaceViewClassIdentifier, View},
};
pub mod archetypes;
pub mod components;
pub mod datatypes;
#[path = "macros.rs"]
mod _macros;
pub mod macros {
pub use super::impl_into_cow;
}
pub mod external {
pub use anyhow;
pub use arrow2;
pub use re_tuid;
}