Enum ruma_events::room::message::MessageType [−][src]
pub enum MessageType { Audio(AudioMessageEventContent), Emote(EmoteMessageEventContent), File(FileMessageEventContent), Image(ImageMessageEventContent), Location(LocationMessageEventContent), Notice(NoticeMessageEventContent), ServerNotice(ServerNoticeMessageEventContent), Text(TextMessageEventContent), Video(VideoMessageEventContent), VerificationRequest(KeyVerificationRequestEventContent), // some variants omitted }
Expand description
The content that is specific to each message type variant.
Variants
Audio(AudioMessageEventContent)
An audio message.
Emote(EmoteMessageEventContent)
An emote message.
File(FileMessageEventContent)
A file message.
Image(ImageMessageEventContent)
An image message.
Location(LocationMessageEventContent)
A location message.
Notice(NoticeMessageEventContent)
A notice message.
ServerNotice(ServerNoticeMessageEventContent)
A server notice message.
Text(TextMessageEventContent)
A text message.
Video(VideoMessageEventContent)
A video message.
VerificationRequest(KeyVerificationRequestEventContent)
This is supported on crate feature
unstable-pre-spec
only.A request to initiate a key verification.
Implementations
Creates a new MessageType
with the given msgtype
string and data.
Prefer to use the public variants of MessageType
where possible; this constructor is meant
be used for unsupported message types only and does not allow setting arbitrary data for
supported ones.
Trait Implementations
Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for MessageType
impl Send for MessageType
impl Sync for MessageType
impl Unpin for MessageType
impl UnwindSafe for MessageType
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