pub struct UsageRecord {Show 29 fields
pub request_id: String,
pub trace_id: String,
pub provider: String,
pub base_url: String,
pub executor_type: String,
pub model: String,
pub alias: String,
pub api_key: String,
pub is_native_key: bool,
pub access_provider: String,
pub session_id: String,
pub parent_session_id: String,
pub auth_id: String,
pub auth_index: String,
pub auth_type: String,
pub source: String,
pub reasoning_effort: String,
pub service_tier: String,
pub response_service_tier: String,
pub response_model: String,
pub generate: bool,
pub stream: bool,
pub requested_at: GoTime,
pub latency_ns: i64,
pub ttft_ns: i64,
pub failed: bool,
pub failure: UsageFailure,
pub detail: UsageDetail,
pub response_headers: Header,
}Fields§
§request_id: String§trace_id: String§provider: String§base_url: String§executor_type: String§model: String§alias: String§api_key: String§is_native_key: bool§access_provider: String§session_id: String§parent_session_id: String§auth_id: String§auth_index: String§auth_type: String§source: String§reasoning_effort: String§service_tier: String§response_service_tier: String§response_model: String§generate: bool§stream: bool§requested_at: GoTime§latency_ns: i64time.Duration in nanoseconds.
ttft_ns: i64time.Duration in nanoseconds.
failed: bool§failure: UsageFailure§detail: UsageDetail§response_headers: HeaderTrait Implementations§
Source§impl Clone for UsageRecord
impl Clone for UsageRecord
Source§impl Debug for UsageRecord
impl Debug for UsageRecord
Source§impl Default for UsageRecord
impl Default for UsageRecord
Source§impl GoJson for UsageRecord
impl GoJson for UsageRecord
Source§fn decode_into(&mut self, v: &Node) -> Result<(), DecodeError>
fn decode_into(&mut self, v: &Node) -> Result<(), DecodeError>
json.Unmarshal into an existing value. null resets slices, maps, pointers and
any, and leaves everything else alone.Source§fn is_empty(&self) -> bool
fn is_empty(&self) -> bool
Go
omitempty: false, 0, “”, nil or empty slices and maps, nil pointers. Structs
(including time.Time) are never empty.Source§fn go_type() -> String
fn go_type() -> String
The Go type as decode errors spell it; containers name their element type
(
[]string, map[string]interface {}).Source§fn decode_value(v: &Node) -> Result<Self, DecodeError>
fn decode_value(v: &Node) -> Result<Self, DecodeError>
Decodes a non-null value from scratch. Implement this or
Self::decode_into.Source§const NULL_CLEARS: bool = false
const NULL_CLEARS: bool = false
Whether
null resets the field (slices, maps, pointers, any); scalars and
structs keep their value.Source§impl GoStruct for UsageRecord
impl GoStruct for UsageRecord
fn encode_fields(&self, w: &mut ObjWriter<'_>)
Source§fn decode_field(
&mut self,
key: &str,
v: &Node,
) -> Option<Result<(), DecodeError>>
fn decode_field( &mut self, key: &str, v: &Node, ) -> Option<Result<(), DecodeError>>
Decodes
v into the field named key (exact match first, then
case-insensitive). None when no field matches.Source§impl PartialEq for UsageRecord
impl PartialEq for UsageRecord
impl StructuralPartialEq for UsageRecord
Auto Trait Implementations§
impl Freeze for UsageRecord
impl RefUnwindSafe for UsageRecord
impl Send for UsageRecord
impl Sync for UsageRecord
impl Unpin for UsageRecord
impl UnsafeUnpin for UsageRecord
impl UnwindSafe for UsageRecord
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more