Struct rerun::StoreEvent
pub struct StoreEvent {
pub store_id: StoreId,
pub store_generation: StoreGeneration,
pub event_id: u64,
pub diff: StoreDiff,
}
Expand description
Everything needed to build custom StoreSubscriber
s.
The atomic unit of change in the Rerun DataStore
.
A StoreEvent
describes the changes caused by the addition or deletion of a
re_log_types::DataRow
in the store.
Methods that mutate the DataStore
, such as DataStore::insert_row
and DataStore::gc
,
return StoreEvent
s that describe the changes.
You can also register your own StoreSubscriber
in order to be notified of changes as soon as they
happen.
Refer to field-level documentation for more details and check out StoreDiff
for a precise
definition of what an event involves.
Fields§
§store_id: StoreId
Which DataStore
sent this event?
store_generation: StoreGeneration
What was the store’s generation when it sent that event?
event_id: u64
Monotonically increasing ID of the event.
This is on a per-store basis.
When handling a StoreEvent
, if this is the first time you process this StoreId
and
the associated event_id
is not 1
, it means you registered late and missed some updates.
diff: StoreDiff
What actually changed?
Refer to StoreDiff
for more information.
Methods from Deref<Target = StoreDiff>§
pub fn union(&self, rhs: &StoreDiff) -> Option<StoreDiff>
pub fn union(&self, rhs: &StoreDiff) -> Option<StoreDiff>
Returns the union of two StoreDiff
s.
They must share the same RowId
, EntityPath
and StoreDiffKind
.
pub fn is_timeless(&self) -> bool
pub fn num_components(&self) -> usize
Trait Implementations§
§impl Clone for StoreEvent
impl Clone for StoreEvent
§fn clone(&self) -> StoreEvent
fn clone(&self) -> StoreEvent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for StoreEvent
impl Debug for StoreEvent
§impl Deref for StoreEvent
impl Deref for StoreEvent
§impl PartialEq for StoreEvent
impl PartialEq for StoreEvent
§fn eq(&self, other: &StoreEvent) -> bool
fn eq(&self, other: &StoreEvent) -> bool
self
and other
values to be equal, and is used
by ==
.