pub struct MessageRow {
pub id: String,
pub conversation_id: String,
pub role: String,
pub content: String,
pub timestamp: SystemTime,
}Expand description
A single message row, returned by search_messages and
get_message_by_id. timestamp is parsed from the SQLite TIMESTAMP
column at fetch time so consumers compare against SystemTime
directly instead of parsing a string.
Fields§
§id: StringStable UUID identifying the message row.
conversation_id: StringIdentifier of the conversation the message belongs to.
role: String"user" or "assistant".
content: StringFull message body text.
timestamp: SystemTimeWall-clock time the message was stored, in UTC.
Trait Implementations§
Source§impl Clone for MessageRow
impl Clone for MessageRow
Source§fn clone(&self) -> MessageRow
fn clone(&self) -> MessageRow
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MessageRow
impl Debug for MessageRow
impl Eq for MessageRow
Source§impl PartialEq for MessageRow
impl PartialEq for MessageRow
Source§fn eq(&self, other: &MessageRow) -> bool
fn eq(&self, other: &MessageRow) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MessageRow
Auto Trait Implementations§
impl Freeze for MessageRow
impl RefUnwindSafe for MessageRow
impl Send for MessageRow
impl Sync for MessageRow
impl Unpin for MessageRow
impl UnsafeUnpin for MessageRow
impl UnwindSafe for MessageRow
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more