pub enum StatePublish {
Snapshot(Value),
Delta(JsonPatch),
Unchanged,
}Expand description
What a publish decided to send.
Variants§
Snapshot(Value)
The whole state — the first publish, or a change too large to patch.
Delta(JsonPatch)
A patch against the previously published snapshot.
Unchanged
The state is byte-identical to the last publish; nothing to send.
Implementations§
Source§impl StatePublish
impl StatePublish
Sourcepub fn into_event(self) -> Option<Event>
pub fn into_event(self) -> Option<Event>
The event to emit, or None for StatePublish::Unchanged.
Trait Implementations§
Source§impl Clone for StatePublish
impl Clone for StatePublish
Source§fn clone(&self) -> StatePublish
fn clone(&self) -> StatePublish
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 moreSource§impl Debug for StatePublish
impl Debug for StatePublish
Source§impl PartialEq for StatePublish
impl PartialEq for StatePublish
Source§fn eq(&self, other: &StatePublish) -> bool
fn eq(&self, other: &StatePublish) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StatePublish
Auto Trait Implementations§
impl Freeze for StatePublish
impl RefUnwindSafe for StatePublish
impl Send for StatePublish
impl Sync for StatePublish
impl Unpin for StatePublish
impl UnsafeUnpin for StatePublish
impl UnwindSafe for StatePublish
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