Struct ruma_events::room::message::TextMessageEventContent [−][src]
pub struct TextMessageEventContent { pub body: String, pub formatted: Option<FormattedBody>, }
Expand description
The payload for a text message.
Fields
body: String
The body of the message.
formatted: Option<FormattedBody>
Formatted form of the message body
.
Implementations
A convenience constructor to create a plain text message.
A convenience constructor to create an html message.
This is supported on crate feature markdown
only.
This is supported on crate feature
markdown
only.A convenience constructor to create a markdown message.
Returns an html message if some markdown formatting was detected, otherwise returns a plain text message.
Trait Implementations
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 RefUnwindSafe for TextMessageEventContent
impl Send for TextMessageEventContent
impl Sync for TextMessageEventContent
impl Unpin for TextMessageEventContent
impl UnwindSafe for TextMessageEventContent
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