pub enum GeminiCountTokensResponse {
Success {
stats_code: StatusCode,
headers: GeminiResponseHeaders,
body: ResponseBody,
},
Error {
stats_code: StatusCode,
headers: GeminiResponseHeaders,
body: GeminiApiErrorResponse,
},
}Expand description
Full HTTP response for Gemini models.countTokens 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 GeminiCountTokensResponse
impl Clone for GeminiCountTokensResponse
Source§fn clone(&self) -> GeminiCountTokensResponse
fn clone(&self) -> GeminiCountTokensResponse
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 GeminiCountTokensResponse
impl Debug for GeminiCountTokensResponse
Source§impl<'de> Deserialize<'de> for GeminiCountTokensResponse
impl<'de> Deserialize<'de> for GeminiCountTokensResponse
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 TryFrom<ClaudeCountTokensResponse> for GeminiCountTokensResponse
impl TryFrom<ClaudeCountTokensResponse> for GeminiCountTokensResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(value: ClaudeCountTokensResponse) -> Result<Self, TransformError>
fn try_from(value: ClaudeCountTokensResponse) -> Result<Self, TransformError>
Performs the conversion.
Source§impl TryFrom<GeminiCountTokensResponse> for ClaudeCountTokensResponse
impl TryFrom<GeminiCountTokensResponse> for ClaudeCountTokensResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(value: GeminiCountTokensResponse) -> Result<Self, TransformError>
fn try_from(value: GeminiCountTokensResponse) -> Result<Self, TransformError>
Performs the conversion.
Source§impl TryFrom<GeminiCountTokensResponse> for OpenAiCountTokensResponse
impl TryFrom<GeminiCountTokensResponse> for OpenAiCountTokensResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(value: GeminiCountTokensResponse) -> Result<Self, TransformError>
fn try_from(value: GeminiCountTokensResponse) -> Result<Self, TransformError>
Performs the conversion.
Source§impl TryFrom<OpenAiCountTokensResponse> for GeminiCountTokensResponse
impl TryFrom<OpenAiCountTokensResponse> for GeminiCountTokensResponse
Source§type Error = TransformError
type Error = TransformError
The type returned in the event of a conversion error.
Source§fn try_from(value: OpenAiCountTokensResponse) -> Result<Self, TransformError>
fn try_from(value: OpenAiCountTokensResponse) -> Result<Self, TransformError>
Performs the conversion.
impl StructuralPartialEq for GeminiCountTokensResponse
Auto Trait Implementations§
impl Freeze for GeminiCountTokensResponse
impl RefUnwindSafe for GeminiCountTokensResponse
impl Send for GeminiCountTokensResponse
impl Sync for GeminiCountTokensResponse
impl Unpin for GeminiCountTokensResponse
impl UnsafeUnpin for GeminiCountTokensResponse
impl UnwindSafe for GeminiCountTokensResponse
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