pub struct MessageSummary {
pub id: MessageId,
pub sender_id: AgentId,
pub sender_name: String,
pub recipient_id: Option<AgentId>,
pub encryption: MessageEncryption,
pub body: Option<String>,
pub sent_at: DateTime<Utc>,
pub read_at: Option<DateTime<Utc>>,
}Expand description
One message as rendered in an inbox.
recipient_id is None for broadcasts. body is None when the
server cannot produce plaintext (E2EE rows, phase 2) — clients
decrypt those locally from the ciphertext fields that phase 2 adds.
Fields§
§id: MessageId§sender_id: AgentId§sender_name: String§recipient_id: Option<AgentId>None = system broadcast (delivered to every agent).
encryption: MessageEncryption§body: Option<String>Plaintext body (server-mode and broadcasts). None for E2EE.
sent_at: DateTime<Utc>§read_at: Option<DateTime<Utc>>When this agent read the message. None = unread.
Trait Implementations§
Source§impl Clone for MessageSummary
impl Clone for MessageSummary
Source§fn clone(&self) -> MessageSummary
fn clone(&self) -> MessageSummary
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 MessageSummary
impl Debug for MessageSummary
Source§impl<'de> Deserialize<'de> for MessageSummary
impl<'de> Deserialize<'de> for MessageSummary
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 Freeze for MessageSummary
impl RefUnwindSafe for MessageSummary
impl Send for MessageSummary
impl Sync for MessageSummary
impl Unpin for MessageSummary
impl UnsafeUnpin for MessageSummary
impl UnwindSafe for MessageSummary
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