pub struct CountTokensResponse {
pub total_tokens: u32,
pub cached_content_token_count: Option<u32>,
}Expand description
Response from the Gemini API for token counting
Fields§
§total_tokens: u32The total number of tokens counted across all instances.
cached_content_token_count: Option<u32>The total number of tokens in the cached content.
Trait Implementations§
Source§impl Clone for CountTokensResponse
impl Clone for CountTokensResponse
Source§fn clone(&self) -> CountTokensResponse
fn clone(&self) -> CountTokensResponse
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 CountTokensResponse
impl Debug for CountTokensResponse
Source§impl<'de> Deserialize<'de> for CountTokensResponse
impl<'de> Deserialize<'de> for CountTokensResponse
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 CountTokensResponse
impl PartialEq for CountTokensResponse
Source§impl Serialize for CountTokensResponse
impl Serialize for CountTokensResponse
impl StructuralPartialEq for CountTokensResponse
Auto Trait Implementations§
impl Freeze for CountTokensResponse
impl RefUnwindSafe for CountTokensResponse
impl Send for CountTokensResponse
impl Sync for CountTokensResponse
impl Unpin for CountTokensResponse
impl UnwindSafe for CountTokensResponse
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