pub struct AssistantEnvelope {
pub id: String,
pub role: String,
pub model: String,
pub content: Vec<ContentBlock>,
pub stop_reason: Option<StopReason>,
pub stop_sequence: Option<String>,
pub usage: Option<Usage>,
pub extras: Extras,
}Expand description
The Anthropic-API-shaped envelope inside an Assistant message.
Fields§
§id: StringMessage id from the Anthropic API.
role: StringFixed value "assistant".
model: StringModel name (e.g. "claude-opus-4-5").
content: Vec<ContentBlock>Content blocks in order (interleaved text + tool-use).
stop_reason: Option<StopReason>Why the turn ended, if it ended.
stop_sequence: Option<String>Stop sequence that triggered end-of-turn, if any.
usage: Option<Usage>Token usage for this turn. Optional - error-path frames don’t carry a usage block.
extras: ExtrasFields of the envelope forge does not model (provider, a
container, context management diagnostics), kept verbatim.
Trait Implementations§
Source§impl Clone for AssistantEnvelope
impl Clone for AssistantEnvelope
Source§impl Debug for AssistantEnvelope
impl Debug for AssistantEnvelope
Source§impl<'de> Deserialize<'de> for AssistantEnvelope
impl<'de> Deserialize<'de> for AssistantEnvelope
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 AssistantEnvelope
impl PartialEq for AssistantEnvelope
Source§impl Serialize for AssistantEnvelope
impl Serialize for AssistantEnvelope
impl StructuralPartialEq for AssistantEnvelope
Auto Trait Implementations§
impl Freeze for AssistantEnvelope
impl RefUnwindSafe for AssistantEnvelope
impl Send for AssistantEnvelope
impl Sync for AssistantEnvelope
impl Unpin for AssistantEnvelope
impl UnsafeUnpin for AssistantEnvelope
impl UnwindSafe for AssistantEnvelope
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