pub enum GeminiGenerateContentResponse {
Success {
stats_code: StatusCode,
headers: GeminiResponseHeaders,
body: ResponseBody,
},
Error {
stats_code: StatusCode,
headers: GeminiResponseHeaders,
body: GeminiApiErrorResponse,
},
}Expand description
Full HTTP response for Gemini models.generateContent endpoint.
Variants§
Success
Fields
§
stats_code: StatusCodeHTTP status code returned by server (should be 200 OK).
§
headers: GeminiResponseHeadersResponse headers.
§
body: ResponseBodySuccessful body.
Error
Fields
§
stats_code: StatusCodeHTTP status code returned by server (typically non-2xx).
§
headers: GeminiResponseHeadersResponse headers.
§
body: GeminiApiErrorResponseError body.
Trait Implementations§
Source§impl Clone for GeminiGenerateContentResponse
impl Clone for GeminiGenerateContentResponse
Source§fn clone(&self) -> GeminiGenerateContentResponse
fn clone(&self) -> GeminiGenerateContentResponse
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<'de> Deserialize<'de> for GeminiGenerateContentResponse
impl<'de> Deserialize<'de> for GeminiGenerateContentResponse
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
Source§impl PartialEq for GeminiGenerateContentResponse
impl PartialEq for GeminiGenerateContentResponse
Source§fn eq(&self, other: &GeminiGenerateContentResponse) -> bool
fn eq(&self, other: &GeminiGenerateContentResponse) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl TryFrom<ClaudeCreateMessageResponse> for GeminiGenerateContentResponse
impl TryFrom<ClaudeCreateMessageResponse> for GeminiGenerateContentResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(value: ClaudeCreateMessageResponse) -> Result<Self, TransformError>
fn try_from(value: ClaudeCreateMessageResponse) -> Result<Self, TransformError>
Performs the conversion.
Source§impl TryFrom<GeminiGenerateContentResponse> for ClaudeCreateMessageResponse
impl TryFrom<GeminiGenerateContentResponse> for ClaudeCreateMessageResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(
value: GeminiGenerateContentResponse,
) -> Result<Self, TransformError>
fn try_from( value: GeminiGenerateContentResponse, ) -> Result<Self, TransformError>
Performs the conversion.
Source§impl TryFrom<GeminiGenerateContentResponse> for GeminiStreamGenerateContentResponse
impl TryFrom<GeminiGenerateContentResponse> for GeminiStreamGenerateContentResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(
value: GeminiGenerateContentResponse,
) -> Result<Self, TransformError>
fn try_from( value: GeminiGenerateContentResponse, ) -> Result<Self, TransformError>
Performs the conversion.
Source§impl TryFrom<GeminiGenerateContentResponse> for OpenAiChatCompletionsResponse
impl TryFrom<GeminiGenerateContentResponse> for OpenAiChatCompletionsResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(
value: GeminiGenerateContentResponse,
) -> Result<Self, TransformError>
fn try_from( value: GeminiGenerateContentResponse, ) -> Result<Self, TransformError>
Performs the conversion.
Source§impl TryFrom<GeminiGenerateContentResponse> for OpenAiCompactResponse
impl TryFrom<GeminiGenerateContentResponse> for OpenAiCompactResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(
value: GeminiGenerateContentResponse,
) -> Result<Self, TransformError>
fn try_from( value: GeminiGenerateContentResponse, ) -> Result<Self, TransformError>
Performs the conversion.
Source§impl TryFrom<GeminiGenerateContentResponse> for OpenAiCreateImageEditResponse
impl TryFrom<GeminiGenerateContentResponse> for OpenAiCreateImageEditResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(
value: GeminiGenerateContentResponse,
) -> Result<Self, TransformError>
fn try_from( value: GeminiGenerateContentResponse, ) -> Result<Self, TransformError>
Performs the conversion.
Source§impl TryFrom<GeminiGenerateContentResponse> for OpenAiCreateImageResponse
impl TryFrom<GeminiGenerateContentResponse> for OpenAiCreateImageResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(
value: GeminiGenerateContentResponse,
) -> Result<Self, TransformError>
fn try_from( value: GeminiGenerateContentResponse, ) -> Result<Self, TransformError>
Performs the conversion.
Source§impl TryFrom<GeminiGenerateContentResponse> for OpenAiCreateResponseResponse
impl TryFrom<GeminiGenerateContentResponse> for OpenAiCreateResponseResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(
value: GeminiGenerateContentResponse,
) -> Result<Self, TransformError>
fn try_from( value: GeminiGenerateContentResponse, ) -> Result<Self, TransformError>
Performs the conversion.
Source§impl TryFrom<GeminiGenerateContentResponse> for Vec<GeminiLiveMessageResponse>
impl TryFrom<GeminiGenerateContentResponse> for Vec<GeminiLiveMessageResponse>
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(
value: GeminiGenerateContentResponse,
) -> Result<Self, TransformError>
fn try_from( value: GeminiGenerateContentResponse, ) -> Result<Self, TransformError>
Performs the conversion.
Source§impl TryFrom<OpenAiChatCompletionsResponse> for GeminiGenerateContentResponse
impl TryFrom<OpenAiChatCompletionsResponse> for GeminiGenerateContentResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(
value: OpenAiChatCompletionsResponse,
) -> Result<Self, TransformError>
fn try_from( value: OpenAiChatCompletionsResponse, ) -> Result<Self, TransformError>
Performs the conversion.
Source§impl TryFrom<OpenAiCreateResponseResponse> for GeminiGenerateContentResponse
impl TryFrom<OpenAiCreateResponseResponse> for GeminiGenerateContentResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(value: OpenAiCreateResponseResponse) -> Result<Self, TransformError>
fn try_from(value: OpenAiCreateResponseResponse) -> Result<Self, TransformError>
Performs the conversion.
Source§impl TryFrom<Vec<GeminiLiveMessageResponse>> for GeminiGenerateContentResponse
impl TryFrom<Vec<GeminiLiveMessageResponse>> for GeminiGenerateContentResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(
value: Vec<GeminiLiveMessageResponse>,
) -> Result<Self, TransformError>
fn try_from( value: Vec<GeminiLiveMessageResponse>, ) -> Result<Self, TransformError>
Performs the conversion.
impl StructuralPartialEq for GeminiGenerateContentResponse
Auto Trait Implementations§
impl Freeze for GeminiGenerateContentResponse
impl RefUnwindSafe for GeminiGenerateContentResponse
impl Send for GeminiGenerateContentResponse
impl Sync for GeminiGenerateContentResponse
impl Unpin for GeminiGenerateContentResponse
impl UnsafeUnpin for GeminiGenerateContentResponse
impl UnwindSafe for GeminiGenerateContentResponse
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