pub struct APIResponse {
pub id: String,
pub object: String,
pub model: Option<String>,
pub choices: Option<Vec<Choice>>,
pub error: Option<APIError>,
pub usage: Option<APIUsage>,
pub created: Option<u64>,
}Expand description
API Response structure from the server
Fields§
§id: StringUnique identifier for the API response
object: StringIDK
model: Option<String>Model name used in the response
choices: Option<Vec<Choice>>Array of choices (results) returned by the API
error: Option<APIError>Error information if the request failed
usage: Option<APIUsage>Information regarding token usage
created: Option<u64>Timestamp of when the response was created
Trait Implementations§
Source§impl Clone for APIResponse
impl Clone for APIResponse
Source§fn clone(&self) -> APIResponse
fn clone(&self) -> APIResponse
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 moreSource§impl Debug for APIResponse
impl Debug for APIResponse
Source§impl<'de> Deserialize<'de> for APIResponse
impl<'de> Deserialize<'de> for APIResponse
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
Auto Trait Implementations§
impl Freeze for APIResponse
impl RefUnwindSafe for APIResponse
impl Send for APIResponse
impl Sync for APIResponse
impl Unpin for APIResponse
impl UnwindSafe for APIResponse
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