pub struct PromptUsageDetail {
pub text_tokens: i32,
pub audio_tokens: i32,
pub image_tokens: i32,
pub cached_tokens: i32,
}Expand description
Details of prompt usage.
Fields§
§text_tokens: i32Text prompt token used.
audio_tokens: i32Audio prompt token used.
image_tokens: i32Image prompt token used.
cached_tokens: i32Token cached by xAI from previous requests and reused for this request.
Trait Implementations§
Source§impl Clone for PromptUsageDetail
impl Clone for PromptUsageDetail
Source§fn clone(&self) -> PromptUsageDetail
fn clone(&self) -> PromptUsageDetail
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 PromptUsageDetail
impl Debug for PromptUsageDetail
Source§impl Default for PromptUsageDetail
impl Default for PromptUsageDetail
Source§fn default() -> PromptUsageDetail
fn default() -> PromptUsageDetail
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PromptUsageDetail
impl<'de> Deserialize<'de> for PromptUsageDetail
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 PromptUsageDetail
impl PartialEq for PromptUsageDetail
Source§impl Serialize for PromptUsageDetail
impl Serialize for PromptUsageDetail
impl StructuralPartialEq for PromptUsageDetail
Auto Trait Implementations§
impl Freeze for PromptUsageDetail
impl RefUnwindSafe for PromptUsageDetail
impl Send for PromptUsageDetail
impl Sync for PromptUsageDetail
impl Unpin for PromptUsageDetail
impl UnwindSafe for PromptUsageDetail
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