pub struct StateDeltaEvent {
pub base: BaseEvent,
pub delta: Vec<PatchOperation>,
pub subagent_run_id: Option<SubagentRunId>,
}Expand description
Mutates the shared state with a JSON Patch document.
Fields§
§base: BaseEventTimestamp and raw provider event.
delta: Vec<PatchOperation>RFC 6902 operations, applied in order to the previous state.
subagent_run_id: Option<SubagentRunId>The subagent that produced this update; absent means the parent
agent. A JSON null is rejected — see crate::event::subagent.
Provenance, not ownership, as on StateSnapshotEvent.
Implementations§
Source§impl StateDeltaEvent
impl StateDeltaEvent
Sourcepub fn new(delta: impl Into<Vec<PatchOperation>>) -> Self
pub fn new(delta: impl Into<Vec<PatchOperation>>) -> Self
Publishes a patch against the current state.
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 (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 ComposeSchema for StateDeltaEvent
impl ComposeSchema for StateDeltaEvent
Source§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<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
Source§impl From<StateDeltaEvent> for Event
impl From<StateDeltaEvent> for Event
Source§fn from(payload: StateDeltaEvent) -> Self
fn from(payload: StateDeltaEvent) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for StateDeltaEvent
impl JsonSchema for StateDeltaEvent
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for StateDeltaEvent
impl PartialEq for StateDeltaEvent
Source§fn eq(&self, other: &StateDeltaEvent) -> bool
fn eq(&self, other: &StateDeltaEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for StateDeltaEvent
impl Serialize for StateDeltaEvent
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§
impl<T> AgentState for T
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