pub struct StateDeltaEvent {
pub base: BaseEvent,
pub delta: Vec<Value>,
}Expand description
Event containing incremental state updates as JSON Patch operations.
This event is sent to update state incrementally using RFC 6902 JSON Patch format. The delta is a vector of patch operations (add, remove, replace, move, copy, test).
Fields§
§base: BaseEventCommon event fields (timestamp, rawEvent).
delta: Vec<Value>JSON Patch operations per RFC 6902.
Implementations§
Source§impl StateDeltaEvent
impl StateDeltaEvent
Sourcepub fn new(delta: Vec<Value>) -> StateDeltaEvent
pub fn new(delta: Vec<Value>) -> StateDeltaEvent
Creates a new StateDeltaEvent with the given patch operations.
Sourcepub fn with_timestamp(self, timestamp: f64) -> StateDeltaEvent
pub fn with_timestamp(self, timestamp: f64) -> StateDeltaEvent
Sets the timestamp for this event.
Trait Implementations§
Source§impl Clone for StateDeltaEvent
impl Clone for StateDeltaEvent
Source§fn clone(&self) -> StateDeltaEvent
fn clone(&self) -> StateDeltaEvent
Returns a duplicate of the value. Read more
1.0.0 · 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 StateDeltaEvent
impl Debug for StateDeltaEvent
Source§impl Default for StateDeltaEvent
impl Default for StateDeltaEvent
Source§fn default() -> StateDeltaEvent
fn default() -> StateDeltaEvent
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for StateDeltaEvent
impl<'de> Deserialize<'de> for StateDeltaEvent
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<StateDeltaEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<StateDeltaEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for StateDeltaEvent
impl PartialEq for StateDeltaEvent
Source§impl Serialize for StateDeltaEvent
impl Serialize for StateDeltaEvent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for StateDeltaEvent
Auto Trait Implementations§
impl Freeze for StateDeltaEvent
impl RefUnwindSafe for StateDeltaEvent
impl Send for StateDeltaEvent
impl Sync for StateDeltaEvent
impl Unpin for StateDeltaEvent
impl UnsafeUnpin for StateDeltaEvent
impl UnwindSafe for StateDeltaEvent
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