pub struct StateUpdate {
pub published: u64,
pub replaced: u64,
pub payload: Arc<Bytes>,
}Expand description
The latest frame published to one state key, and how many frames the key has published in total.
A state bus keeps only the latest frame, so frames published faster than a subscriber reads them are overwritten. The count lets the subscriber tell: if it moved by more than one since its last read, frames were skipped.
Fields§
§published: u64§replaced: u64published as of the latest frame that replaced the entity instead
of patching it: an upsert or a delete. If it is past a
subscriber’s last read, a client’s copy may hold fields the entity no
longer has, which no patch removes. Zero until one is published.
payload: Arc<Bytes>Trait Implementations§
Source§impl Clone for StateUpdate
impl Clone for StateUpdate
Source§impl Debug for StateUpdate
impl Debug for StateUpdate
Auto Trait Implementations§
impl Freeze for StateUpdate
impl RefUnwindSafe for StateUpdate
impl Send for StateUpdate
impl Sync for StateUpdate
impl Unpin for StateUpdate
impl UnsafeUnpin for StateUpdate
impl UnwindSafe for StateUpdate
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