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_timeless(&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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.