pub struct Part {
pub id: String,
pub kind: PartKind,
pub content: String,
pub attachment: Option<PartAttachment>,
pub tool_call_id: Option<String>,
pub tool_name: Option<String>,
pub tool_replay: Option<ProviderReplayMeta>,
pub prune_state: PruneState,
pub reasoning_meta: Option<ProviderReasoningReplay>,
pub response_meta: Option<ResponseTextMeta>,
}Fields§
§id: Stringe.g. “m3.p0”
kind: PartKind§content: String§attachment: Option<PartAttachment>§tool_call_id: Option<String>§tool_name: Option<String>§tool_replay: Option<ProviderReplayMeta>Opaque provider replay state attached to a ToolCall part.
prune_state: PruneState§reasoning_meta: Option<ProviderReasoningReplay>Populated only for PartKind::Reasoning parts. Carries opaque
provider replay metadata so the adapter can re-emit the exact same
reasoning item on subsequent turns.
#[serde(default, skip_serializing_if)] so older snapshots that
predate this field round-trip unchanged.
response_meta: Option<ResponseTextMeta>Provider message metadata for assistant text parts. Legacy snapshots omit it; adapters synthesize deterministic ids when replaying older assistant text.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Part
impl<'de> Deserialize<'de> for Part
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Part, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Part, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Part
impl Serialize for Part
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for Part
impl RefUnwindSafe for Part
impl Send for Part
impl Sync for Part
impl Unpin for Part
impl UnsafeUnpin for Part
impl UnwindSafe for Part
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