#[non_exhaustive]pub enum StepContent {
Text {
text: String,
provider_metadata: Option<ProviderMetadata>,
},
Reasoning {
text: String,
provider_metadata: Option<ProviderMetadata>,
},
ReasoningFile(GeneratedFile),
File(GeneratedFile),
Custom {
kind: CustomKind,
provider_metadata: Option<ProviderMetadata>,
},
Source(Source),
ToolCall(ParsedToolCall),
ToolResult(ToolResult),
ToolError(ToolExecutionError),
ToolApprovalRequest(ToolApprovalRequestContent),
ToolApprovalResponse(ToolApprovalResponseContent),
ToolOutputDenied(ToolOutputDenied),
}Expand description
A content part of a step.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Text
Generated text.
Fields
§
provider_metadata: Option<ProviderMetadata>Provider-specific metadata.
Reasoning
Reasoning text.
Fields
§
provider_metadata: Option<ProviderMetadata>Provider-specific metadata.
ReasoningFile(GeneratedFile)
A reasoning artifact stored as a file.
File(GeneratedFile)
A generated file.
Custom
Provider-specific content.
Fields
§
kind: CustomKindKind of the content.
§
provider_metadata: Option<ProviderMetadata>Provider-specific metadata.
Source(Source)
A citation source.
ToolCall(ParsedToolCall)
A parsed tool call.
ToolResult(ToolResult)
A tool result (client- or provider-executed).
ToolError(ToolExecutionError)
A tool error (client- or provider-executed).
ToolApprovalRequest(ToolApprovalRequestContent)
A request to approve a tool call.
ToolApprovalResponse(ToolApprovalResponseContent)
An automatic approval decision made by the approval policy.
ToolOutputDenied(ToolOutputDenied)
A tool call whose execution was denied.
Implementations§
Trait Implementations§
Source§impl Clone for StepContent
impl Clone for StepContent
Source§fn clone(&self) -> StepContent
fn clone(&self) -> StepContent
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 StepContent
impl Debug for StepContent
Source§impl<'de> Deserialize<'de> for StepContent
impl<'de> Deserialize<'de> for StepContent
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 StepContent
impl PartialEq for StepContent
Source§impl Serialize for StepContent
impl Serialize for StepContent
impl StructuralPartialEq for StepContent
Auto Trait Implementations§
impl !Freeze for StepContent
impl RefUnwindSafe for StepContent
impl Send for StepContent
impl Sync for StepContent
impl Unpin for StepContent
impl UnsafeUnpin for StepContent
impl UnwindSafe for StepContent
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