pub struct MessageRecord {
pub id: i64,
pub thread_id: String,
pub role: String,
pub content: String,
pub item: Option<Value>,
pub created_at: i64,
pub parent_entry_id: Option<i64>,
}Expand description
A single message entry in a conversation thread.
Messages form a tree structure via parent_entry_id,
enabling conversation branching and forking.
Fields§
§id: i64Auto-incremented unique identifier for this message.
thread_id: StringID of the thread this message belongs to.
role: StringRole of the message sender (e.g. "user", "assistant", "system").
content: StringText content of the message.
item: Option<Value>Optional structured item payload (tool calls, tool results, etc.).
created_at: i64Unix timestamp (seconds) when the message was created.
parent_entry_id: Option<i64>ID of the parent message, forming a tree structure. None for root messages.
Trait Implementations§
Source§impl Clone for MessageRecord
impl Clone for MessageRecord
Source§impl Debug for MessageRecord
impl Debug for MessageRecord
Source§impl<'de> Deserialize<'de> for MessageRecord
impl<'de> Deserialize<'de> for MessageRecord
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
Auto Trait Implementations§
impl Forget for MessageRecord
impl Freeze for MessageRecord
impl Move for MessageRecord
impl RefUnwindSafe for MessageRecord
impl Send for MessageRecord
impl Sync for MessageRecord
impl Unpin for MessageRecord
impl UnsafeUnpin for MessageRecord
impl UnwindSafe for MessageRecord
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