pub struct Message {
pub message_id: MessageId,
pub from: Address,
pub to: Address,
pub subject: String,
pub body: String,
pub reply_to: Option<MessageId>,
pub correlation: Option<String>,
pub refs: Vec<MessageRef>,
pub created_at_unix_ms: u64,
}Expand description
A stored message. refs defaults on decode
(harness_mail_message_old_shape_without_refs_deserializes’s own
forward-compatibility property, kept here) so a message written before a
future field addition still deserializes with an empty ref list rather
than failing decode.
Fields§
§message_id: MessageId§from: AddressThe session’s own address if a session sent this, the account’s
address if an account did – never a room (see
[validate_participant_address]).
to: Address§subject: String§body: String§reply_to: Option<MessageId>§correlation: Option<String>Replaces the source’s task_id. Correlation only: the mailbox never
reads it to decide anything. It exists so a caller can group
messages by whatever grouping concept it owns – a task, a run, a
conversation – without the mailbox needing to know what that concept
is.
refs: Vec<MessageRef>§created_at_unix_ms: u64Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Message
impl<'de> Deserialize<'de> for Message
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 Message
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin for Message
impl UnwindSafe for Message
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