pub struct SystemOneResponse<A = Answers> { /* private fields */ }Expand description
The answers to one System One call, with the model and token usage the server reported and the HTTP response they came in.
A is what the answers decode into: Answers, a lookup by question name,
unless the question set was declared as a struct, in which case each answer
lands in that struct’s field of the same name.
Serializing a response writes model, usage and answers only; the HTTP
metadata in meta is runtime state, not part of
the API payload.
Implementations§
Source§impl<A> SystemOneResponse<A>
impl<A> SystemOneResponse<A>
Sourcepub fn model(&self) -> &str
pub fn model(&self) -> &str
The model that answered. It may differ from the alias the request
named: asking for jev-latest is answered by a concrete model.
Sourcepub fn meta(&self) -> &ResponseMeta
pub fn meta(&self) -> &ResponseMeta
The status, headers and raw body of the HTTP response.
Sourcepub fn into_answers(self) -> A
pub fn into_answers(self) -> A
Gives up everything but the answers.
Trait Implementations§
Source§impl<A: Clone> Clone for SystemOneResponse<A>
impl<A: Clone> Clone for SystemOneResponse<A>
Source§impl<A: Debug> Debug for SystemOneResponse<A>
impl<A: Debug> Debug for SystemOneResponse<A>
Source§impl<A: PartialEq> PartialEq for SystemOneResponse<A>
impl<A: PartialEq> PartialEq for SystemOneResponse<A>
Source§impl<A> Serialize for SystemOneResponse<A>where
A: Serialize,
impl<A> Serialize for SystemOneResponse<A>where
A: Serialize,
impl<A: PartialEq> StructuralPartialEq for SystemOneResponse<A>
Auto Trait Implementations§
impl<A = Answers> !Freeze for SystemOneResponse<A>
impl<A> RefUnwindSafe for SystemOneResponse<A>where
A: RefUnwindSafe,
impl<A> Send for SystemOneResponse<A>where
A: Send,
impl<A> Sync for SystemOneResponse<A>where
A: Sync,
impl<A> Unpin for SystemOneResponse<A>where
A: Unpin,
impl<A> UnsafeUnpin for SystemOneResponse<A>where
A: UnsafeUnpin,
impl<A> UnwindSafe for SystemOneResponse<A>where
A: UnwindSafe,
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