pub struct TextMessageChunkEvent {
pub base: BaseEvent,
pub message_id: Option<MessageId>,
pub role: Option<TextMessageRole>,
pub delta: Option<String>,
pub name: Option<String>,
pub subagent_run_id: Option<SubagentRunId>,
}Expand description
A self-contained text update: start, content and end folded into one event.
Producers that cannot bracket a message use this; consumers expand a run of
chunks sharing a message_id into the equivalent start/content/end triple.
Fields§
§base: BaseEventTimestamp and raw provider event.
message_id: Option<MessageId>The message this chunk belongs to.
role: Option<TextMessageRole>Who is speaking.
delta: Option<String>The text to append.
name: Option<String>Display name for the author.
subagent_run_id: Option<SubagentRunId>The subagent that produced this event; absent means the parent agent.
A JSON null is rejected — see crate::event::subagent. Under
concurrency a chunk that omits its message_id is resolved within the
sending subagent’s own stream, so attribute every chunk when several
subagents stream at once.
Implementations§
Trait Implementations§
Source§impl Clone for TextMessageChunkEvent
impl Clone for TextMessageChunkEvent
Source§fn clone(&self) -> TextMessageChunkEvent
fn clone(&self) -> TextMessageChunkEvent
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 TextMessageChunkEvent
impl ComposeSchema for TextMessageChunkEvent
Source§impl Debug for TextMessageChunkEvent
impl Debug for TextMessageChunkEvent
Source§impl Default for TextMessageChunkEvent
impl Default for TextMessageChunkEvent
Source§fn default() -> TextMessageChunkEvent
fn default() -> TextMessageChunkEvent
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TextMessageChunkEvent
impl<'de> Deserialize<'de> for TextMessageChunkEvent
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<TextMessageChunkEvent> for Event
impl From<TextMessageChunkEvent> for Event
Source§fn from(payload: TextMessageChunkEvent) -> Self
fn from(payload: TextMessageChunkEvent) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for TextMessageChunkEvent
impl JsonSchema for TextMessageChunkEvent
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 TextMessageChunkEvent
impl PartialEq for TextMessageChunkEvent
Source§fn eq(&self, other: &TextMessageChunkEvent) -> bool
fn eq(&self, other: &TextMessageChunkEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TextMessageChunkEvent
impl Serialize for TextMessageChunkEvent
impl StructuralPartialEq for TextMessageChunkEvent
Auto Trait Implementations§
impl Freeze for TextMessageChunkEvent
impl RefUnwindSafe for TextMessageChunkEvent
impl Send for TextMessageChunkEvent
impl Sync for TextMessageChunkEvent
impl Unpin for TextMessageChunkEvent
impl UnsafeUnpin for TextMessageChunkEvent
impl UnwindSafe for TextMessageChunkEvent
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