#[non_exhaustive]pub struct CountTokensRequestBody {Show 15 fields
pub model: ClaudeModel,
pub messages: Vec<MessageParam>,
pub cache_control: Option<CacheControl>,
pub context_management: Option<ContextManagementConfig>,
pub diagnostics: Option<DiagnosticsParam>,
pub mcp_servers: Option<Vec<McpServer>>,
pub output_config: Option<OutputConfig>,
pub output_format: Option<JsonSchemaFormat>,
pub service_tier: Option<RequestServiceTier>,
pub speed: Option<Speed>,
pub system: Option<SystemPrompt>,
pub thinking: Option<ThinkingConfig>,
pub tool_choice: Option<ToolChoice>,
pub tools: Option<Vec<Tool>>,
pub extra: JsonObject,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.model: ClaudeModel§messages: Vec<MessageParam>§cache_control: Option<CacheControl>§context_management: Option<ContextManagementConfig>§diagnostics: Option<DiagnosticsParam>§mcp_servers: Option<Vec<McpServer>>§output_config: Option<OutputConfig>§output_format: Option<JsonSchemaFormat>👎Deprecated:
use output_config.format instead
Deprecated. Use output_config.format instead.
service_tier: Option<RequestServiceTier>§speed: Option<Speed>§system: Option<SystemPrompt>§thinking: Option<ThinkingConfig>§tool_choice: Option<ToolChoice>§tools: Option<Vec<Tool>>§extra: JsonObjectImplementations§
Trait Implementations§
Source§impl Clone for CountTokensRequestBody
impl Clone for CountTokensRequestBody
Source§fn clone(&self) -> CountTokensRequestBody
fn clone(&self) -> CountTokensRequestBody
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 moreSource§impl Debug for CountTokensRequestBody
impl Debug for CountTokensRequestBody
Source§impl<'de> Deserialize<'de> for CountTokensRequestBody
impl<'de> Deserialize<'de> for CountTokensRequestBody
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 CountTokensRequestBody
impl PartialEq for CountTokensRequestBody
Source§impl Serialize for CountTokensRequestBody
impl Serialize for CountTokensRequestBody
impl StructuralPartialEq for CountTokensRequestBody
Auto Trait Implementations§
impl Freeze for CountTokensRequestBody
impl RefUnwindSafe for CountTokensRequestBody
impl Send for CountTokensRequestBody
impl Sync for CountTokensRequestBody
impl Unpin for CountTokensRequestBody
impl UnsafeUnpin for CountTokensRequestBody
impl UnwindSafe for CountTokensRequestBody
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