pub struct ResponseMeta {
pub id: Option<String>,
pub model: String,
pub provider: Option<String>,
pub usage: Usage,
pub latency: Duration,
}Expand description
The response envelope without the answers: identifiers, model snapshot, usage, cost, and latency.
Returned alongside a typed decision by crate::Client::decide_with, for callers
who need to record cost or the dated model snapshot without giving up the typed
answer struct.
Fields§
§id: Option<String>Request identifier, when the gateway reported one.
model: StringThe model snapshot that actually served the request.
provider: Option<String>The serving provider, when the gateway reported one.
usage: UsageToken and cost accounting.
latency: DurationWall-clock latency of the request, including any retries.
Trait Implementations§
Source§impl Clone for ResponseMeta
impl Clone for ResponseMeta
Source§impl Debug for ResponseMeta
impl Debug for ResponseMeta
Source§impl PartialEq for ResponseMeta
impl PartialEq for ResponseMeta
impl StructuralPartialEq for ResponseMeta
Auto Trait Implementations§
impl Freeze for ResponseMeta
impl RefUnwindSafe for ResponseMeta
impl Send for ResponseMeta
impl Sync for ResponseMeta
impl Unpin for ResponseMeta
impl UnsafeUnpin for ResponseMeta
impl UnwindSafe for ResponseMeta
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