pub struct ImageGenerationUsage {
pub input_tokens: Option<u32>,
pub output_tokens: Option<u32>,
pub total_tokens: Option<u32>,
}Expand description
Token consumption for an image generation (absent for providers that do not report it).
Fields§
§input_tokens: Option<u32>§output_tokens: Option<u32>§total_tokens: Option<u32>Trait Implementations§
Source§impl Clone for ImageGenerationUsage
impl Clone for ImageGenerationUsage
Source§fn clone(&self) -> ImageGenerationUsage
fn clone(&self) -> ImageGenerationUsage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ImageGenerationUsage
Source§impl Debug for ImageGenerationUsage
impl Debug for ImageGenerationUsage
Source§impl Default for ImageGenerationUsage
impl Default for ImageGenerationUsage
Source§fn default() -> ImageGenerationUsage
fn default() -> ImageGenerationUsage
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ImageGenerationUsage
impl<'de> Deserialize<'de> for ImageGenerationUsage
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
impl Eq for ImageGenerationUsage
Source§impl PartialEq for ImageGenerationUsage
impl PartialEq for ImageGenerationUsage
Source§fn eq(&self, other: &ImageGenerationUsage) -> bool
fn eq(&self, other: &ImageGenerationUsage) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ImageGenerationUsage
Auto Trait Implementations§
impl Freeze for ImageGenerationUsage
impl RefUnwindSafe for ImageGenerationUsage
impl Send for ImageGenerationUsage
impl Sync for ImageGenerationUsage
impl Unpin for ImageGenerationUsage
impl UnsafeUnpin for ImageGenerationUsage
impl UnwindSafe for ImageGenerationUsage
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