pub struct ResponseBody {
pub total_tokens: u64,
pub cached_content_token_count: Option<u64>,
pub prompt_tokens_details: Option<Vec<GeminiModalityTokenCount>>,
pub cache_tokens_details: Option<Vec<GeminiModalityTokenCount>>,
}Expand description
Successful response body for Gemini models.countTokens.
Fields§
§total_tokens: u64Number of tokens in the prompt input.
cached_content_token_count: Option<u64>Number of tokens in cached content, when cache is used.
prompt_tokens_details: Option<Vec<GeminiModalityTokenCount>>Per-modality token details for prompt input.
cache_tokens_details: Option<Vec<GeminiModalityTokenCount>>Per-modality token details for cached input.
Trait Implementations§
Source§impl Clone for ResponseBody
impl Clone for ResponseBody
Source§fn clone(&self) -> ResponseBody
fn clone(&self) -> ResponseBody
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 ResponseBody
impl Debug for ResponseBody
Source§impl<'de> Deserialize<'de> for ResponseBody
impl<'de> Deserialize<'de> for ResponseBody
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 ResponseBody
impl PartialEq for ResponseBody
Source§impl Serialize for ResponseBody
impl Serialize for ResponseBody
impl StructuralPartialEq for ResponseBody
Auto Trait Implementations§
impl Freeze for ResponseBody
impl RefUnwindSafe for ResponseBody
impl Send for ResponseBody
impl Sync for ResponseBody
impl Unpin for ResponseBody
impl UnsafeUnpin for ResponseBody
impl UnwindSafe for ResponseBody
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