pub struct ActivityDeltaEvent {
pub base: BaseEvent,
pub message_id: MessageId,
pub activity_type: String,
pub patch: Vec<JsonValue>,
}Expand description
Event containing an incremental activity update.
This event applies a JSON Patch (RFC 6902) to an existing activity’s content. Use this for efficient partial updates to activity content.
§Example
use ag_ui_core::event::ActivityDeltaEvent;
use ag_ui_core::MessageId;
use serde_json::json;
let event = ActivityDeltaEvent::new(
MessageId::random(),
"PLAN",
vec![json!({"op": "add", "path": "/steps/-", "value": "deploy"})],
);Fields§
§base: BaseEventCommon event fields (timestamp, rawEvent).
message_id: MessageIdThe message ID for this activity.
activity_type: StringThe type of activity (e.g., “PLAN”, “RESEARCH”).
patch: Vec<JsonValue>JSON Patch operations (RFC 6902) to apply to the content.
Implementations§
Trait Implementations§
Source§impl Clone for ActivityDeltaEvent
impl Clone for ActivityDeltaEvent
Source§fn clone(&self) -> ActivityDeltaEvent
fn clone(&self) -> ActivityDeltaEvent
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 ActivityDeltaEvent
impl Debug for ActivityDeltaEvent
Source§impl<'de> Deserialize<'de> for ActivityDeltaEvent
impl<'de> Deserialize<'de> for ActivityDeltaEvent
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 PartialEq for ActivityDeltaEvent
impl PartialEq for ActivityDeltaEvent
Source§impl Serialize for ActivityDeltaEvent
impl Serialize for ActivityDeltaEvent
impl StructuralPartialEq for ActivityDeltaEvent
Auto Trait Implementations§
impl Freeze for ActivityDeltaEvent
impl RefUnwindSafe for ActivityDeltaEvent
impl Send for ActivityDeltaEvent
impl Sync for ActivityDeltaEvent
impl Unpin for ActivityDeltaEvent
impl UnsafeUnpin for ActivityDeltaEvent
impl UnwindSafe for ActivityDeltaEvent
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