pub enum PartKind {
Text,
Media,
File,
Structured,
Reasoning,
ToolCall,
ToolResult,
Custom,
}Expand description
Discriminant for Part variants, used in streaming Deltas.
When a Delta::BeginPart arrives the consumer uses the PartKind to
allocate the right buffer before subsequent append deltas arrive.
Variants§
Text
Corresponds to Part::Text.
Media
Corresponds to Part::Media.
File
Corresponds to Part::File.
Structured
Corresponds to Part::Structured.
Reasoning
Corresponds to Part::Reasoning.
ToolCall
Corresponds to Part::ToolCall.
ToolResult
Corresponds to Part::ToolResult.
Custom
Corresponds to Part::Custom.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PartKind
impl<'de> Deserialize<'de> for PartKind
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 Copy for PartKind
impl Eq for PartKind
impl StructuralPartialEq for PartKind
Auto Trait Implementations§
impl Freeze for PartKind
impl RefUnwindSafe for PartKind
impl Send for PartKind
impl Sync for PartKind
impl Unpin for PartKind
impl UnsafeUnpin for PartKind
impl UnwindSafe for PartKind
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