pub struct StateDelta {
pub key: Cow<'static, str>,
pub op: DeltaOp,
pub value: Value,
pub source: DeltaSource,
}Expand description
状态增量 — 节点对 State 的修改意图。
Fields§
§key: Cow<'static, str>§op: DeltaOp§value: Value§source: DeltaSourceImplementations§
Source§impl StateDelta
impl StateDelta
pub fn put(key: impl Into<String>, value: Value) -> Self
pub fn delete(key: impl Into<String>) -> Self
pub fn put_with_source( key: impl Into<String>, value: Value, source: DeltaSource, ) -> Self
pub fn delete_with_source(key: impl Into<String>, source: DeltaSource) -> Self
pub fn with_writer(self, writer: impl Into<String>) -> Self
pub fn with_source(self, source: DeltaSource) -> Self
Trait Implementations§
Source§impl Clone for StateDelta
impl Clone for StateDelta
Source§fn clone(&self) -> StateDelta
fn clone(&self) -> StateDelta
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 StateDelta
impl Debug for StateDelta
Source§impl<'de> Deserialize<'de> for StateDelta
impl<'de> Deserialize<'de> for StateDelta
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for StateDelta
impl RefUnwindSafe for StateDelta
impl Send for StateDelta
impl Sync for StateDelta
impl Unpin for StateDelta
impl UnsafeUnpin for StateDelta
impl UnwindSafe for StateDelta
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