Enum Message Copy item path Source pub enum Message {
Text {
body: String ,
formatted_body: Option <String >,
format: Option <String >,
},
Notice {
body: String ,
formatted_body: Option <String >,
format: Option <String >,
},
Image {
body: String ,
url: String ,
info: Option <ImageInfo >,
thumbnail_url: Option <String >,
thumbnail_info: Option <ImageInfo >,
},
Emote {
body: String ,
},
File {
body: String ,
filename: String ,
info: Option <FileInfo >,
thumbnail_info: Option <ImageInfo >,
thumbnail_url: Option <String >,
url: String ,
},
Location {
body: String ,
geo_uri: String ,
},
Audio {
body: String ,
url: String ,
info: Option <AudioInfo >,
},
Video {
body: String ,
url: String ,
info: Option <VideoInfo >,
},
}
Expand description A message sent to a room.
This message is the most basic message and is used to represent text.
Fields § formatted_body: Option <String >
The formatted body of the message (if the message is formatted).
The format of the formatted body (if the message is formatted).
A m.notice message should be considered similar to a plain m.text message except
that clients should visually distinguish it in some way.
It is intended to be used by automated clients, such as bots, bridges, and other
entities, rather than humans. Additionally, such automated agents which watch a
room for messages and respond to them ought to ignore m.notice messages. This
helps to prevent infinite-loop situations where two automated clients continuously
exchange messages, as each responds to the other.
Fields § formatted_body: Option <String >
The formatted body of the message (if the message is formatted).
The format of the formatted body (if the message is formatted).
This message represents a single image and an optional thumbnail.
Information about an image and it’s thumbnail.
Fields § body: String
A textual representation of the image. This could be the alt text of the image,
the filename of the image, or some kind of content description for accessibility
e.g. ‘image attachment’.
Metadata about the image referred to in url.
The URL to the thumbnail of the image.
Metadata about the image referred to in thumbnail_url.
This message is similar to m.text except that the sender is ‘performing’
the action contained in the body key, similar to /me in IRC. This
message should be prefixed by the name of the sender. This message could
also be represented in a different colour to distinguish it from regular
m.text messages.
Fields § body: String
The emote action to perform.
This message represents a generic file.
Fields § body: String
A human-readable description of the file. This is recommended to be
the filename of the original upload.
The original filename of the uploaded file.
Information about the file referred to in url.
Metadata about the image referred to in thumbnail_url.
The URL to the thumbnail of the file.
This message represents a real-world location.
Fields § body: String
A description of the location e.g. ‘Big Ben, London, UK’, or some
kind of content description for accessibility e.g. ‘location
attachment’.
A geo URI representing this location.
This message represents a single audio clip.
Fields § body: String
A description of the audio e.g. ‘Bee Gees - Stayin’ Alive’, or some
kind of content description for accessibility e.g. ‘audio
attachment’.
The URL to the audio clip.
Metadata for the audio clip referred to in url.
This message represents a single video clip.
Fields § body: String
A description of the video e.g. ‘Gangnam style’, or some kind of
content description for accessibility e.g. ‘video attachment’.
The URL to the video clip.
Metadata about the video clip referred to in url.
Performs copy-assignment from
source
.
Read more Formats the value using the given formatter.
Read more Deserialize this value from the given Serde deserializer.
Read more Serialize this value into the given Serde serializer.
Read more Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit
)
Performs copy-assignment from
self
to
dest
.
Read more Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From <T> for U
chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more Uses borrowed data to replace owned data, usually by cloning.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.