Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused Datatype and DatatypeBatch #7256

Merged
merged 2 commits into from
Aug 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
update docs
teh-cmc committed Aug 23, 2024
commit b18f28631c1b4fa533f3d9de529f6addfb66165d
2 changes: 1 addition & 1 deletion crates/store/re_types/src/lib.rs
Original file line number Diff line number Diff line change
@@ -227,7 +227,7 @@ pub mod components {

/// The low-level datatypes that [`components`] are built from.
///
/// They all implement the [`Datatype`] trait.
/// They all implement the [`Loggable`] trait.
pub mod datatypes {

// Some datatypes are so fundamental and used everywhere that we want them to be exposed
4 changes: 2 additions & 2 deletions crates/store/re_types_core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
//! When multiple instances of a [`Component`] are put together in an array, they yield a
//! [`ComponentBatch`]: the atomic unit of (de)serialization.
//!
//! Internally, [`Component`]s are implemented using many different [`Datatype`]s.
//! Internally, [`Component`]s are implemented using many different [`Loggable`]s.
//!
//! ## Feature flags
#![doc = document_features::document_features!()]
@@ -117,7 +117,7 @@ pub mod archetypes;
/// There are also re-exported by `re_types`.
pub mod components;

/// Fundamental [`Datatype`]s that are implemented in `re_types_core` directly for convenience and
/// Fundamental datatypes that are implemented in `re_types_core` directly for convenience and
/// dependency optimization.
///
/// There are also re-exported by `re_types`.
11 changes: 5 additions & 6 deletions crates/store/re_types_core/src/loggable.rs
Original file line number Diff line number Diff line change
@@ -14,13 +14,12 @@ use crate::{Archetype, ComponentBatch, LoggableBatch};
/// Internally, Arrow, and by extension Rerun, only deal with arrays of data.
/// We refer to individual entries in these arrays as instances.
///
/// [`Datatype`] and [`Component`] are specialization of the [`Loggable`] trait that are
/// automatically implemented based on the type used for [`Loggable::Name`].
/// [`Component`] is a specialization of the [`Loggable`] trait where [`Loggable::Name`] ==
/// [`ComponentName`].
///
/// Implementing the [`Loggable`] trait (and by extension [`Datatype`]/[`Component`])
/// automatically derives the [`LoggableBatch`] implementation (and by extension
/// [`DatatypeBatch`]/[`ComponentBatch`]), which makes it possible to work with lists' worth of data
/// in a generic fashion.
/// Implementing the [`Loggable`] trait (and by extension [`Component`]) automatically derives the
/// [`LoggableBatch`] implementation (and by extension [`ComponentBatch`]), which makes it possible to
/// work with lists' worth of data in a generic fashion.
pub trait Loggable: 'static + Send + Sync + Clone + Sized + SizeBytes {
type Name: std::fmt::Display;

2 changes: 1 addition & 1 deletion docs/snippets/all/tutorials/custom_data.rs
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ impl rerun::AsComponents for CustomPoints3D {

// ---

/// A custom [`rerun::Component`] that is backed by a builtin [`rerun::Float32`] scalar [`rerun::Datatype`].
/// A custom [`rerun::Component`] that is backed by a builtin [`rerun::Float32`] scalar.
#[derive(Debug, Clone, Copy)]
struct Confidence(rerun::Float32);