enum MessageRepr {
Assistant {
message: AssistantEnvelope,
session_id: String,
parent_tool_use_id: Option<String>,
error: Option<AssistantMessageError>,
uuid: Option<String>,
timestamp: Option<String>,
extras: Extras,
},
User {
message: UserEnvelope,
session_id: String,
parent_tool_use_id: Option<String>,
uuid: Option<String>,
tool_use_result: Option<Value>,
timestamp: Option<String>,
synthetic: bool,
extras: Extras,
},
System(SystemRepr),
RateLimitEvent {
rate_limit_info: RateLimitInfo,
uuid: String,
session_id: String,
extras: Extras,
},
CommandLifecycle {
command_uuid: String,
state: String,
uuid: String,
session_id: String,
extras: Extras,
},
Result {Show 17 fields
subtype: String,
session_id: String,
is_error: bool,
num_turns: u64,
duration_ms: u64,
duration_api_ms: u64,
stop_reason: Option<String>,
total_cost_usd: Option<f64>,
usage: Option<Usage>,
result: Option<String>,
structured_output: Option<Value>,
model_usage: Option<Value>,
permission_denials: Option<Vec<Value>>,
errors: Option<Vec<String>>,
uuid: Option<String>,
terminal_reason: Option<TerminalReason>,
extras: Extras,
},
StreamEvent {
uuid: String,
session_id: String,
event: Value,
parent_tool_use_id: Option<String>,
extras: Extras,
},
ToolProgress {
tool_use_id: String,
tool_name: String,
elapsed_time_seconds: f64,
heartbeat: bool,
parent_tool_use_id: Option<String>,
session_id: Option<String>,
uuid: Option<String>,
extras: Extras,
},
Error {
error: String,
extras: Extras,
},
}Variants§
Assistant
User
Fields
§
message: UserEnvelopeSystem(SystemRepr)
RateLimitEvent
CommandLifecycle
Result
Fields
§
terminal_reason: Option<TerminalReason>StreamEvent
Fields
ToolProgress
The CLI’s heartbeat for a running tool call. A top-level type of
its own, not a system subtype.
Fields
Error
Trait Implementations§
Source§impl Clone for MessageRepr
impl Clone for MessageRepr
Source§impl Debug for MessageRepr
impl Debug for MessageRepr
Source§impl<'de> Deserialize<'de> for MessageRepr
impl<'de> Deserialize<'de> for MessageRepr
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<Message> for MessageRepr
impl From<Message> for MessageRepr
Source§impl From<MessageRepr> for Message
impl From<MessageRepr> for Message
Source§fn from(repr: MessageRepr) -> Self
fn from(repr: MessageRepr) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MessageRepr
impl RefUnwindSafe for MessageRepr
impl Send for MessageRepr
impl Sync for MessageRepr
impl Unpin for MessageRepr
impl UnsafeUnpin for MessageRepr
impl UnwindSafe for MessageRepr
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