pub struct RequestMetadata {
pub response_time: Option<u64>,
pub provider: Option<String>,
pub tokens_used: Option<u32>,
pub credits_used: Option<f64>,
pub credits_remaining: Option<f64>,
pub request_id: Option<String>,
}Expand description
Represents metadata extracted from the response headers of an API request.
Fields§
§response_time: Option<u64>The time taken for the request to complete, in milliseconds.
provider: Option<String>The AI provider that handled the request.
tokens_used: Option<u32>The number of tokens used in the request.
credits_used: Option<f64>The number of credits used for the request.
credits_remaining: Option<f64>The number of credits remaining after the request.
request_id: Option<String>The unique ID of the request, for tracking and debugging.
Trait Implementations§
Source§impl Clone for RequestMetadata
impl Clone for RequestMetadata
Source§fn clone(&self) -> RequestMetadata
fn clone(&self) -> RequestMetadata
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 moreAuto Trait Implementations§
impl Freeze for RequestMetadata
impl RefUnwindSafe for RequestMetadata
impl Send for RequestMetadata
impl Sync for RequestMetadata
impl Unpin for RequestMetadata
impl UnwindSafe for RequestMetadata
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