pub struct ReasoningDetailsContent {
pub details: Vec<Value>,
}Expand description
Persistent envelope for provider-native reasoning items on an
assistant turn. The wire shape is Vec<Value> matching
OpenRouter’s reasoning_details[] schema (the broadest typed
surface across providers); as_items lifts it to typed
crate::reasoning::ReasoningItems for codec operations and from_items projects
typed items back. The details field stays the source of truth so
persisted trajectories round-trip byte-exact, even when a future
provider sends shapes the typed enum doesn’t yet recognize.
Fields§
§details: Vec<Value>Implementations§
Source§impl ReasoningDetailsContent
impl ReasoningDetailsContent
pub fn new(details: Vec<Value>) -> Self
Sourcepub fn as_items(&self) -> Vec<ReasoningItem>
pub fn as_items(&self) -> Vec<ReasoningItem>
Lift the stored details array into typed
crate::reasoning::ReasoningItems. Items that don’t match a known variant
are preserved in details but elided from the typed view —
so consumers iterating typed items never see corrupt data
while replay-via-details still ships the original bytes.
Sourcepub fn from_items(items: &[ReasoningItem]) -> Self
pub fn from_items(items: &[ReasoningItem]) -> Self
Build from typed items. Used when a codec produces typed items from a non-OpenRouter provider response.
Sourcepub fn has_signed_payload(&self) -> bool
pub fn has_signed_payload(&self) -> bool
True iff any item carries a signed/encrypted payload that a strict-replay provider would reject if missing on next turn.
Trait Implementations§
Source§impl Clone for ReasoningDetailsContent
impl Clone for ReasoningDetailsContent
Source§fn clone(&self) -> ReasoningDetailsContent
fn clone(&self) -> ReasoningDetailsContent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReasoningDetailsContent
impl Debug for ReasoningDetailsContent
Source§impl<'de> Deserialize<'de> for ReasoningDetailsContent
impl<'de> Deserialize<'de> for ReasoningDetailsContent
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>,
Source§impl PartialEq for ReasoningDetailsContent
impl PartialEq for ReasoningDetailsContent
Source§fn eq(&self, other: &ReasoningDetailsContent) -> bool
fn eq(&self, other: &ReasoningDetailsContent) -> bool
self and other values to be equal, and is used by ==.