pub enum MessageChunk {
Human(HumanChunk),
Ai(AiChunk),
System(SystemChunk),
Tool(ToolChunk),
}Expand description
A partial message emitted while a model streams. Variants mirror the
final Message enum so consumers can match on type before the full
message has arrived.
Variants§
Human(HumanChunk)
Streaming user-message chunk (rare — most providers stream assistant).
Ai(AiChunk)
Streaming assistant-message chunk.
System(SystemChunk)
Streaming system-message chunk (rare).
Tool(ToolChunk)
Streaming tool-result chunk.
Implementations§
Trait Implementations§
Source§impl Clone for MessageChunk
impl Clone for MessageChunk
Source§fn clone(&self) -> MessageChunk
fn clone(&self) -> MessageChunk
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 MessageChunk
impl Debug for MessageChunk
Source§impl<'de> Deserialize<'de> for MessageChunk
impl<'de> Deserialize<'de> for MessageChunk
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 MessageChunk
impl PartialEq for MessageChunk
Source§fn eq(&self, other: &MessageChunk) -> bool
fn eq(&self, other: &MessageChunk) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MessageChunk
impl Serialize for MessageChunk
impl StructuralPartialEq for MessageChunk
Auto Trait Implementations§
impl Freeze for MessageChunk
impl RefUnwindSafe for MessageChunk
impl Send for MessageChunk
impl Sync for MessageChunk
impl Unpin for MessageChunk
impl UnsafeUnpin for MessageChunk
impl UnwindSafe for MessageChunk
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