From 2d2daf1461de1207fe9012e524d99b6d61d6b84d Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Fri, 23 Aug 2024 12:18:08 +0200 Subject: [PATCH 1/2] remove Datatype and DatatypeBatch --- crates/store/re_types_core/src/lib.rs | 4 +-- crates/store/re_types_core/src/loggable.rs | 10 +------ .../store/re_types_core/src/loggable_batch.rs | 28 +------------------ crates/top/re_sdk/src/lib.rs | 6 ++-- 4 files changed, 7 insertions(+), 41 deletions(-) diff --git a/crates/store/re_types_core/src/lib.rs b/crates/store/re_types_core/src/lib.rs index bf3145ca491d..a0ab5489cb28 100644 --- a/crates/store/re_types_core/src/lib.rs +++ b/crates/store/re_types_core/src/lib.rs @@ -95,8 +95,8 @@ pub use self::{ }, arrow_buffer::ArrowBuffer, arrow_string::ArrowString, - loggable::{Component, ComponentName, ComponentNameSet, Datatype, DatatypeName, Loggable}, - loggable_batch::{ComponentBatch, DatatypeBatch, LoggableBatch, MaybeOwnedComponentBatch}, + loggable::{Component, ComponentName, ComponentNameSet, DatatypeName, Loggable}, + loggable_batch::{ComponentBatch, LoggableBatch, MaybeOwnedComponentBatch}, result::{ DeserializationError, DeserializationResult, ResultExt, SerializationError, SerializationResult, _Backtrace, diff --git a/crates/store/re_types_core/src/loggable.rs b/crates/store/re_types_core/src/loggable.rs index 8f4871fe5bfb..b3a501b997fc 100644 --- a/crates/store/re_types_core/src/loggable.rs +++ b/crates/store/re_types_core/src/loggable.rs @@ -5,7 +5,7 @@ use crate::{ }; #[allow(unused_imports)] // used in docstrings -use crate::{Archetype, ComponentBatch, DatatypeBatch, LoggableBatch}; +use crate::{Archetype, ComponentBatch, LoggableBatch}; // --- @@ -127,14 +127,6 @@ pub trait Loggable: 'static + Send + Sync + Clone + Sized + SizeBytes { } } -/// A [`Datatype`] describes plain old data that can be used by any number of [`Component`]s. -/// -/// Any [`Loggable`] with a [`Loggable::Name`] set to [`DatatypeName`] automatically implements -/// [`Datatype`]. -pub trait Datatype: Loggable {} - -impl> Datatype for L {} - /// A [`Component`] describes semantic data that can be used by any number of [`Archetype`]s. /// /// Any [`Loggable`] with a [`Loggable::Name`] set to [`ComponentName`] automatically implements diff --git a/crates/store/re_types_core/src/loggable_batch.rs b/crates/store/re_types_core/src/loggable_batch.rs index 46f34f177166..d7a9d6b5e2b2 100644 --- a/crates/store/re_types_core/src/loggable_batch.rs +++ b/crates/store/re_types_core/src/loggable_batch.rs @@ -1,4 +1,4 @@ -use crate::{Component, ComponentName, Datatype, DatatypeName, Loggable, SerializationResult}; +use crate::{Component, ComponentName, Loggable, SerializationResult}; #[allow(unused_imports)] // used in docstrings use crate::Archetype; @@ -34,12 +34,6 @@ pub trait LoggableBatch { fn to_arrow(&self) -> SerializationResult>; } -/// A [`DatatypeBatch`] represents an array's worth of [`Datatype`] instances. -/// -/// Any [`LoggableBatch`] with a [`Loggable::Name`] set to [`DatatypeName`] automatically -/// implements [`DatatypeBatch`]. -pub trait DatatypeBatch: LoggableBatch {} - /// A [`ComponentBatch`] represents an array's worth of [`Component`] instances. /// /// Any [`LoggableBatch`] with a [`Loggable::Name`] set to [`ComponentName`] automatically @@ -143,8 +137,6 @@ impl LoggableBatch for L { } } -impl DatatypeBatch for D {} - impl ComponentBatch for C {} // --- Unary Option --- @@ -173,8 +165,6 @@ impl LoggableBatch for Option { } } -impl DatatypeBatch for Option {} - impl ComponentBatch for Option {} // --- Vec --- @@ -203,8 +193,6 @@ impl LoggableBatch for Vec { } } -impl DatatypeBatch for Vec {} - impl ComponentBatch for Vec {} // --- Vec