pub struct Reasoning {
pub id: Option<String>,
pub content: Vec<ReasoningContent>,
}Expand description
An assistant reasoning (“thinking”) block.
Fields§
§id: Option<String>Provider reasoning identifier, when supplied by the upstream API.
content: Vec<ReasoningContent>Ordered reasoning content blocks.
Implementations§
Source§impl Reasoning
impl Reasoning
Sourcepub fn new_with_signature(
text: impl Into<String>,
signature: Option<String>,
) -> Self
pub fn new_with_signature( text: impl Into<String>, signature: Option<String>, ) -> Self
A single text reasoning block with an optional provider signature.
Sourcepub fn first_text(&self) -> Option<&str>
pub fn first_text(&self) -> Option<&str>
The first text reasoning block, if present.
Sourcepub fn first_signature(&self) -> Option<&str>
pub fn first_signature(&self) -> Option<&str>
The first signature from text reasoning, if present.
Sourcepub fn display_text(&self) -> String
pub fn display_text(&self) -> String
Render reasoning as displayable text by joining text-like blocks with newlines.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Reasoning
impl<'de> Deserialize<'de> for Reasoning
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 StructuralPartialEq for Reasoning
Auto Trait Implementations§
impl Freeze for Reasoning
impl RefUnwindSafe for Reasoning
impl Send for Reasoning
impl Sync for Reasoning
impl Unpin for Reasoning
impl UnsafeUnpin for Reasoning
impl UnwindSafe for Reasoning
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