#[non_exhaustive]pub struct ChangeEvent {
pub id: u64,
pub verb: ChangeVerb,
pub path: ValidatedWorldPath,
pub etag: String,
}Expand description
Protocol-neutral change event delivered to subscribers.
On targets with native 64-bit atomics, ids advance through the full u64
range via AtomicU64. On 32-bit targets without native 64-bit atomics, a
mutex-backed u64 counter provides the same external id range. The counter
uses saturating increments, so u64::MAX is the rollover-imminent signal on
all platforms.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: u64Monotonically increasing event id. Use this as since for resumed
subscriptions.
verb: ChangeVerbEngine mutation that produced the change.
path: ValidatedWorldPathCanonical world path the change applies to.
etag: StringStrong ETag after the change (empty string for ChangeVerb::Delete).
Trait Implementations§
Source§impl Clone for ChangeEvent
impl Clone for ChangeEvent
Source§fn clone(&self) -> ChangeEvent
fn clone(&self) -> ChangeEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ChangeEvent
impl RefUnwindSafe for ChangeEvent
impl Send for ChangeEvent
impl Sync for ChangeEvent
impl Unpin for ChangeEvent
impl UnsafeUnpin for ChangeEvent
impl UnwindSafe for ChangeEvent
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
Mutably borrows from an owned value. Read more