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 }
events
only.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)
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
pub fn deserialize<D>(
deserializer: D
) -> Result<MessageType, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
pub fn deserialize<D>(
deserializer: D
) -> Result<MessageType, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more