Struct ruma_events::room::message::MessageEventContent [−][src]
pub struct MessageEventContent { pub msgtype: MessageType, pub relates_to: Option<Relation>, }
Expand description
The payload for MessageEvent
.
Fields
msgtype: MessageType
A key which identifies the type of message being sent.
This also holds the specific content of each message.
relates_to: Option<Relation>
Information about related messages for rich replies.
Implementations
Create a MessageEventContent
with the given MessageType
.
A constructor to create a plain text message.
A constructor to create an html message.
A constructor to create a plain text notice.
A constructor to create an html notice.
Creates a plain text reply to a message.
pub fn text_reply_html(
reply: impl Into<String>,
html_reply: impl Into<String>,
original_message: &MessageEvent
) -> Self
pub fn text_reply_html(
reply: impl Into<String>,
html_reply: impl Into<String>,
original_message: &MessageEvent
) -> Self
Creates a html text reply to a message.
Creates a plain text notice reply to a message.
pub fn notice_reply_html(
reply: impl Into<String>,
html_reply: impl Into<String>,
original_message: &MessageEvent
) -> Self
pub fn notice_reply_html(
reply: impl Into<String>,
html_reply: impl Into<String>,
original_message: &MessageEvent
) -> Self
Creates a html text notice reply to a message.
Trait Implementations
Deserialize this value from the given Serde deserializer. Read more
A matrix event identifier, like m.room.message
.
Constructs the given event content.
Performs the conversion.
The redacted form of the event’s content.
Transform self
into a redacted form (removing most or all fields) according to the spec. Read more
Auto Trait Implementations
impl RefUnwindSafe for MessageEventContent
impl Send for MessageEventContent
impl Sync for MessageEventContent
impl Unpin for MessageEventContent
impl UnwindSafe for MessageEventContent
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V