pub struct UsageMetadataBuilder(/* private fields */);Expand description
Builder for UsageMetadata.
Implementations§
Source§impl UsageMetadataBuilder
impl UsageMetadataBuilder
pub fn prompt_token_count(self, value: impl Into<i64>) -> Self
pub fn cached_content_token_count(self, value: impl Into<i64>) -> Self
pub fn candidates_token_count(self, value: impl Into<i64>) -> Self
pub fn tool_use_prompt_token_count(self, value: impl Into<i64>) -> Self
pub fn thoughts_token_count(self, value: impl Into<i64>) -> Self
pub fn total_token_count(self, value: impl Into<i64>) -> Self
pub fn prompt_tokens_details( self, value: impl Into<Vec<ModalityTokenCount>>, ) -> Self
pub fn cache_tokens_details( self, value: impl Into<Vec<ModalityTokenCount>>, ) -> Self
pub fn candidates_tokens_details( self, value: impl Into<Vec<ModalityTokenCount>>, ) -> Self
pub fn tool_use_prompt_tokens_details( self, value: impl Into<Vec<ModalityTokenCount>>, ) -> Self
pub fn service_tier(self, value: impl Into<ServiceTier>) -> Self
pub fn rest(self, value: Rest) -> Self
Sourcepub fn build(self) -> UsageMetadata
pub fn build(self) -> UsageMetadata
Return the completed wire value.
Auto Trait Implementations§
impl Freeze for UsageMetadataBuilder
impl RefUnwindSafe for UsageMetadataBuilder
impl Send for UsageMetadataBuilder
impl Sync for UsageMetadataBuilder
impl Unpin for UsageMetadataBuilder
impl UnsafeUnpin for UsageMetadataBuilder
impl UnwindSafe for UsageMetadataBuilder
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