pub struct OutgoingMessage {
pub kind: MessageKind,
pub body: String,
pub reply_to: Option<EventId>,
pub edit_of: Option<EventId>,
}Expand description
One message a caller wants sent via MessengerCommand::SendMessage —
M13b’s binding content shape: text/notice/emote, an optional reply
pointer, and an optional edit target (which must name one of the
caller’s own already-sent events — MessengerCore::dispatch rejects
an edit of someone else’s event rather than silently sending a
replacement the room’s other members will refuse to accept, per
m.replace’s own “must come from the original sender” rule,
crate::room::relations’s own module doc). reply_to and edit_of
are mutually exclusive at the wire level — if both are set, edit_of
wins (an edit’s own m.relates_to is m.replace, not a reply).
Fields§
§kind: MessageKindWhich msgtype this renders as.
body: StringThe message’s own plain-text body (the edited/new body, if this is an edit).
reply_to: Option<EventId>A rich-reply pointer (m.in_reply_to), if any.
edit_of: Option<EventId>The event this message replaces, if this is an edit — must be one of the caller’s own already-sent events (this module’s own doc).
Trait Implementations§
Source§impl Clone for OutgoingMessage
impl Clone for OutgoingMessage
Source§fn clone(&self) -> OutgoingMessage
fn clone(&self) -> OutgoingMessage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OutgoingMessage
impl Debug for OutgoingMessage
impl Eq for OutgoingMessage
Source§impl PartialEq for OutgoingMessage
impl PartialEq for OutgoingMessage
impl StructuralPartialEq for OutgoingMessage
Auto Trait Implementations§
impl Freeze for OutgoingMessage
impl RefUnwindSafe for OutgoingMessage
impl Send for OutgoingMessage
impl Sync for OutgoingMessage
impl Unpin for OutgoingMessage
impl UnsafeUnpin for OutgoingMessage
impl UnwindSafe for OutgoingMessage
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
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
key and return true if they are equal.