Struct rerun::StoreEvent
source · 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 timepoint(&self) -> TimePoint
pub fn is_static(&self) -> bool
pub fn num_components(&self) -> usize
Trait Implementations§
source§impl Clone for StoreEvent
impl Clone for StoreEvent
source§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 moresource§impl Debug for StoreEvent
impl Debug for StoreEvent
source§impl Deref for StoreEvent
impl Deref for StoreEvent
source§impl PartialEq for StoreEvent
impl PartialEq for StoreEvent
source§fn eq(&self, other: &StoreEvent) -> bool
fn eq(&self, other: &StoreEvent) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for StoreEvent
Auto Trait Implementations§
impl Freeze for StoreEvent
impl !RefUnwindSafe for StoreEvent
impl Send for StoreEvent
impl Sync for StoreEvent
impl Unpin for StoreEvent
impl !UnwindSafe for StoreEvent
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> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
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