pub enum MeteringDetails {
Model {
model: String,
provider: Option<String>,
provider_attempt_id: ProviderAttemptId,
source: MeteringSource,
outcome: MeteringOutcome,
},
Tool {
call_id: ToolCallId,
name: String,
source: MeteringSource,
outcome: MeteringOutcome,
},
}Expand description
Stable attribution for one operation; contains no request, secret or price.
Variants§
Model
One model invocation (including summarization).
Fields
§
provider_attempt_id: ProviderAttemptIdStable identity recorded before dispatch.
§
source: MeteringSourceWhether usage came from the provider.
§
outcome: MeteringOutcomeResult known when recording usage.
Tool
One tool invocation.
Fields
§
call_id: ToolCallIdStable tool call identity.
§
source: MeteringSourceDeclared resource weights are estimates, not prices.
§
outcome: MeteringOutcomeResult known when recording usage.
Implementations§
Trait Implementations§
Source§impl Clone for MeteringDetails
impl Clone for MeteringDetails
Source§fn clone(&self) -> MeteringDetails
fn clone(&self) -> MeteringDetails
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 Debug for MeteringDetails
impl Debug for MeteringDetails
Source§impl<'de> Deserialize<'de> for MeteringDetails
impl<'de> Deserialize<'de> for MeteringDetails
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
impl Eq for MeteringDetails
Source§impl PartialEq for MeteringDetails
impl PartialEq for MeteringDetails
Source§impl Serialize for MeteringDetails
impl Serialize for MeteringDetails
impl StructuralPartialEq for MeteringDetails
Auto Trait Implementations§
impl Freeze for MeteringDetails
impl RefUnwindSafe for MeteringDetails
impl Send for MeteringDetails
impl Sync for MeteringDetails
impl Unpin for MeteringDetails
impl UnsafeUnpin for MeteringDetails
impl UnwindSafe for MeteringDetails
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