pub struct RowId(/* private fields */);
Expand description
A unique ID for a row’s worth of data within a chunk.
There is no relationship whatsoever between a ChunkId
and the RowId
s within that chunk.
§String format
Example: row_182342300C5F8C327a7b4a6e5a379ac4
.
The “row_” prefix is optional when parsing.
See re_tuid
docs for explanations of TUID namespaces.
§Uniqueness
Duplicated RowId
s within a single recording is considered undefined behavior.
While it is benign in most cases, care has to be taken when manually crafting RowId
s.
Ideally: don’t do so and stick to RowId::new
instead to avoid bad surprises.
This makes it easy to build and maintain secondary indices around RowId
s with few to no
extraneous state tracking.
§Query
Queries (both latest-at & range semantics) will defer to RowId
order as a tie-breaker when
looking at several rows worth of data that rest at the exact same timestamp.
In pseudo-code:
rr.set_time("frame", sequence=10)
rr.log("my_entity", point1, row_id=#1)
rr.log("my_entity", point2, row_id=#0)
rr.query("my_entity", at=("frame", 10)) # returns `point1`
Think carefully about your RowId
s when logging a lot of data at the same timestamp.
§Garbage collection
Garbage collection is handled at the chunk level by first ordering the chunks based on the minimum
RowId
present in each of them.
Garbage collection therefore happens (roughly) in the logger’s wall-clock order.
This has very important implications when inserting data far into the past or into the future:
think carefully about your RowId
s in these cases.
Implementations§
Source§impl RowId
impl RowId
pub const ZERO: Self
pub const MAX: Self
pub fn from_tuid(tuid: Tuid) -> Self
pub fn as_tuid(&self) -> Tuid
Sourcepub fn next(&self) -> Self
pub fn next(&self) -> Self
Returns the next logical RowId
.
Beware: wrong usage can easily lead to conflicts.
Prefer RowId::new
when unsure.
Sourcepub fn incremented_by(&self, n: u64) -> Self
pub fn incremented_by(&self, n: u64) -> Self
Returns the n
-next logical RowId
.
This is equivalent to calling RowId::next
n
times.
Wraps the monotonically increasing back to zero on overflow.
Beware: wrong usage can easily lead to conflicts.
Prefer RowId::new
when unsure.
pub fn from_u128(id: u128) -> Self
pub fn arrow_from_slice(slice: &[Self]) -> FixedSizeBinaryArray
Sourcepub fn slice_from_arrow(array: &FixedSizeBinaryArray) -> &[Self]
pub fn slice_from_arrow(array: &FixedSizeBinaryArray) -> &[Self]
Panics if the array is of the wrong width
Source§impl RowId
impl RowId
pub fn partial_descriptor() -> ComponentDescriptor
Methods from Deref<Target = Tuid>§
pub const ARROW_EXTENSION_NAME: &'static str = "rerun.datatypes.TUID"
pub const ZERO: Tuid
pub const MAX: Tuid
pub fn as_u128(&self) -> u128
Sourcepub fn nanos_since_epoch(&self) -> u64
pub fn nanos_since_epoch(&self) -> u64
Approximate nanoseconds since unix epoch.
The upper 64 bits of the Tuid
.
Sourcepub fn incremented_by(&self, n: u64) -> Tuid
pub fn incremented_by(&self, n: u64) -> Tuid
Returns the n
-next logical Tuid
.
This is equivalent to calling Tuid::next
n
times.
Wraps the monotonically increasing back to zero on overflow.
Beware: wrong usage can easily lead to conflicts.
Prefer Tuid::new
when unsure.
Sourcepub fn short_string(&self) -> String
pub fn short_string(&self) -> String
A shortened string representation of the Tuid
.
Trait Implementations§
Source§impl Component for RowId
impl Component for RowId
Source§fn name() -> ComponentType
fn name() -> ComponentType
rerun.components.Position2D
.Source§impl<'de> Deserialize<'de> for RowId
impl<'de> Deserialize<'de> for RowId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Loggable for RowId
impl Loggable for RowId
Source§fn arrow_datatype() -> DataType
fn arrow_datatype() -> DataType
arrow::datatypes::DataType
, excluding datatype extensions.Source§fn to_arrow_opt<'a>(
_values: impl IntoIterator<Item = Option<impl Into<Cow<'a, Self>>>>,
) -> SerializationResult<ArrayRef>where
Self: 'a,
fn to_arrow_opt<'a>(
_values: impl IntoIterator<Item = Option<impl Into<Cow<'a, Self>>>>,
) -> SerializationResult<ArrayRef>where
Self: 'a,
Source§fn to_arrow<'a>(
values: impl IntoIterator<Item = impl Into<Cow<'a, Self>>>,
) -> SerializationResult<ArrayRef>
fn to_arrow<'a>( values: impl IntoIterator<Item = impl Into<Cow<'a, Self>>>, ) -> SerializationResult<ArrayRef>
Source§fn from_arrow(array: &dyn Array) -> DeserializationResult<Vec<Self>>
fn from_arrow(array: &dyn Array) -> DeserializationResult<Vec<Self>>
Loggable
s.fn arrow_empty() -> ArrayRef
Source§fn from_arrow_opt(data: &dyn Array) -> DeserializationResult<Vec<Option<Self>>>
fn from_arrow_opt(data: &dyn Array) -> DeserializationResult<Vec<Option<Self>>>
Loggable
s.Source§fn verify_arrow_array(data: &dyn Array) -> DeserializationResult<()>
fn verify_arrow_array(data: &dyn Array) -> DeserializationResult<()>
Source§impl Ord for RowId
impl Ord for RowId
Source§impl PartialOrd for RowId
impl PartialOrd for RowId
Source§impl SizeBytes for RowId
impl SizeBytes for RowId
Source§fn heap_size_bytes(&self) -> u64
fn heap_size_bytes(&self) -> u64
self
uses on the heap. Read moreSource§fn total_size_bytes(&self) -> u64
fn total_size_bytes(&self) -> u64
self
in bytes, accounting for both stack and heap space.Source§fn stack_size_bytes(&self) -> u64
fn stack_size_bytes(&self) -> u64
self
on the stack, in bytes. Read moreimpl AnyBitPattern for RowId
impl Copy for RowId
impl Eq for RowId
impl NoUninit for RowId
impl StructuralPartialEq for RowId
Auto Trait Implementations§
impl Freeze for RowId
impl RefUnwindSafe for RowId
impl Send for RowId
impl Sync for RowId
impl Unpin for RowId
impl UnwindSafe for RowId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self
.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<L> ComponentBatch for L
impl<L> ComponentBatch for L
Source§fn to_arrow(&self) -> Result<Arc<dyn Array>, SerializationError>
fn to_arrow(&self) -> Result<Arc<dyn Array>, SerializationError>
Source§fn to_arrow_list_array(&self) -> SerializationResult<ArrowListArray>
fn to_arrow_list_array(&self) -> SerializationResult<ArrowListArray>
Source§fn serialized(
&self,
component_descr: ComponentDescriptor,
) -> Option<SerializedComponentBatch>
fn serialized( &self, component_descr: ComponentDescriptor, ) -> Option<SerializedComponentBatch>
ComponentBatch
. Read moreSource§fn try_serialized(
&self,
component_descr: ComponentDescriptor,
) -> SerializationResult<SerializedComponentBatch>
fn try_serialized( &self, component_descr: ComponentDescriptor, ) -> SerializationResult<SerializedComponentBatch>
ComponentBatch
. Read moreSource§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more