pub struct MessageMetadata {
pub completed_at: Option<i64>,
pub duration_ms: Option<u64>,
pub model: Option<String>,
pub provider: Option<String>,
pub token_usage: Option<TokenUsage>,
pub stats: Option<ExecutionStats>,
pub finish_reason: Option<FinishReason>,
pub cost: Option<CostInfo>,
}Expand description
Message metadata (AI SDK compatible)
Fields§
§completed_at: Option<i64>When response completed (Unix ms)
duration_ms: Option<u64>Total duration in ms
model: Option<String>Model used (e.g., “gpt-4o”, “claude-3-opus”)
provider: Option<String>Provider (e.g., “azure”, “anthropic”)
token_usage: Option<TokenUsage>Token usage (aggregated across all LLM calls)
stats: Option<ExecutionStats>Execution statistics
finish_reason: Option<FinishReason>Why the response finished
cost: Option<CostInfo>Cost information (if available)
Trait Implementations§
Source§impl Clone for MessageMetadata
impl Clone for MessageMetadata
Source§fn clone(&self) -> MessageMetadata
fn clone(&self) -> MessageMetadata
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 MessageMetadata
impl Debug for MessageMetadata
Source§impl Default for MessageMetadata
impl Default for MessageMetadata
Source§fn default() -> MessageMetadata
fn default() -> MessageMetadata
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MessageMetadata
impl<'de> Deserialize<'de> for MessageMetadata
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
Auto Trait Implementations§
impl Freeze for MessageMetadata
impl RefUnwindSafe for MessageMetadata
impl Send for MessageMetadata
impl Sync for MessageMetadata
impl Unpin for MessageMetadata
impl UnsafeUnpin for MessageMetadata
impl UnwindSafe for MessageMetadata
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