Skip to content

Commit

Permalink
doc update on recording stream reflecting that individual components …
Browse files Browse the repository at this point in the history
…can be logged
  • Loading branch information
Wumpf committed Oct 18, 2024
1 parent 33a4121 commit 9829f5a
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions crates/top/re_sdk/src/recording_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,8 @@ impl RecordingStream {
/// Log data to Rerun.
///
/// This is the main entry point for logging data to rerun. It can be used to log anything
/// that implements the [`AsComponents`], such as any [archetype](https://docs.rs/rerun/latest/rerun/archetypes/index.html).
/// that implements the [`AsComponents`], such as any [archetype](https://docs.rs/rerun/latest/rerun/archetypes/index.html)
/// or individual [component](https://docs.rs/rerun/latest/rerun/components/index.html).
///
/// The data will be timestamped automatically based on the [`RecordingStream`]'s internal clock.
/// See [`RecordingStream::set_time_sequence`] etc for more information.
Expand Down Expand Up @@ -889,9 +890,9 @@ impl RecordingStream {
pub fn log(
&self,
ent_path: impl Into<EntityPath>,
arch: &impl AsComponents,
as_components: &impl AsComponents,
) -> RecordingStreamResult<()> {
self.log_with_static(ent_path, false, arch)
self.log_with_static(ent_path, false, as_components)
}

/// Lower-level logging API to provide data spanning multiple timepoints.
Expand Down Expand Up @@ -951,7 +952,8 @@ impl RecordingStream {
/// Log data to Rerun.
///
/// It can be used to log anything
/// that implements the [`AsComponents`], such as any [archetype](https://docs.rs/rerun/latest/rerun/archetypes/index.html).
/// that implements the [`AsComponents`], such as any [archetype](https://docs.rs/rerun/latest/rerun/archetypes/index.html)
/// or individual [component](https://docs.rs/rerun/latest/rerun/components/index.html).
///
/// Static data has no time associated with it, exists on all timelines, and unconditionally shadows
/// any temporal data of the same type.
Expand All @@ -972,9 +974,9 @@ impl RecordingStream {
pub fn log_static(
&self,
ent_path: impl Into<EntityPath>,
arch: &impl AsComponents,
as_components: &impl AsComponents,
) -> RecordingStreamResult<()> {
self.log_with_static(ent_path, true, arch)
self.log_with_static(ent_path, true, as_components)
}

#[deprecated(since = "0.16.0", note = "use `log_static` instead")]
Expand Down Expand Up @@ -1016,14 +1018,15 @@ impl RecordingStream {
&self,
ent_path: impl Into<EntityPath>,
static_: bool,
arch: &impl AsComponents,
as_components: &impl AsComponents,
) -> RecordingStreamResult<()> {
let row_id = RowId::new(); // Create row-id as early as possible. It has a timestamp and is used to estimate e2e latency.
self.log_component_batches_impl(
row_id,
ent_path,
static_,
arch.as_component_batches()
as_components
.as_component_batches()
.iter()
.map(|any_comp_batch| any_comp_batch.as_ref()),
)
Expand Down

0 comments on commit 9829f5a

Please sign in to comment.