pub struct ConversationRecord {
pub id: ConversationId,
pub account_id: AccountId,
pub created_at: DateTime<Utc>,
pub metadata: Value,
}Expand description
A conversation (a chat thread) owned by an account.
Fields§
§id: ConversationIdIdentifier.
account_id: AccountIdOwning tenant.
created_at: DateTime<Utc>Creation time, supplied by the caller.
metadata: ValueApplication-defined metadata (title, channel, external ids…). Never interpreted by the library.
Implementations§
Source§impl ConversationRecord
impl ConversationRecord
Sourcepub fn new(
id: ConversationId,
account_id: AccountId,
created_at: DateTime<Utc>,
) -> Self
pub fn new( id: ConversationId, account_id: AccountId, created_at: DateTime<Utc>, ) -> Self
Builds a record without metadata.
Sourcepub fn with_metadata(self, metadata: Value) -> Self
pub fn with_metadata(self, metadata: Value) -> Self
Attaches metadata.
Trait Implementations§
Source§impl Clone for ConversationRecord
impl Clone for ConversationRecord
Source§impl Debug for ConversationRecord
impl Debug for ConversationRecord
Source§impl<'de> Deserialize<'de> for ConversationRecord
impl<'de> Deserialize<'de> for ConversationRecord
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 Eq for ConversationRecord
Source§impl PartialEq for ConversationRecord
impl PartialEq for ConversationRecord
Source§impl Serialize for ConversationRecord
impl Serialize for ConversationRecord
impl StructuralPartialEq for ConversationRecord
Auto Trait Implementations§
impl Freeze for ConversationRecord
impl RefUnwindSafe for ConversationRecord
impl Send for ConversationRecord
impl Sync for ConversationRecord
impl Unpin for ConversationRecord
impl UnsafeUnpin for ConversationRecord
impl UnwindSafe for ConversationRecord
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.