pub struct Messages(pub Vec<Message>);Expand description
A conversation: an ordered list of turns.
Carried between nodes as a Value::Json under this exact shape, so any
consumer — Rust, Python, the report renderer — reads the same structure.
Tuple Fields§
§0: Vec<Message>Implementations§
Source§impl Messages
impl Messages
Sourcepub fn from_value(value: &Value) -> Result<Self>
pub fn from_value(value: &Value) -> Result<Self>
Read a conversation off an edge.
Accepts three shapes, in decreasing specificity: a full message list,
a bare string (promoted to a single user turn), and a Value::Text
(likewise). The promotions exist so a plain prompt can feed a node
expecting a conversation without ceremony — the common first hop.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Messages
impl<'de> Deserialize<'de> for Messages
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 IntoIterator for Messages
impl IntoIterator for Messages
impl StructuralPartialEq for Messages
Auto Trait Implementations§
impl Freeze for Messages
impl RefUnwindSafe for Messages
impl Send for Messages
impl Sync for Messages
impl Unpin for Messages
impl UnsafeUnpin for Messages
impl UnwindSafe for Messages
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