[−][src]Enum gm_types::messages::Message
A message sent to a room.
Variants
This message is the most basic message and is used to represent text.
Fields of Text
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 of Notice
This message represents a single image and an optional thumbnail. Information about an image and it's thumbnail.
Fields of Image
body: StringA 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'.
url: StringThe URL to the image.
info: Option<ImageInfo>Metadata about the image referred to in url.
thumbnail_url: Option<String>The URL to the thumbnail of the image.
thumbnail_info: Option<ImageInfo>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 of Emote
body: StringThe emote action to perform.
This message represents a generic file.
Fields of File
body: StringA human-readable description of the file. This is recommended to be the filename of the original upload.
filename: StringThe original filename of the uploaded file.
info: Option<FileInfo>Information about the file referred to in url.
thumbnail_info: Option<ImageInfo>Metadata about the image referred to in thumbnail_url.
thumbnail_url: Option<String>The URL to the thumbnail of the file.
url: StringThe URL to the file.
This message represents a real-world location.
Fields of Location
This message represents a single audio clip.
Fields of Audio
This message represents a single video clip.
Fields of Video
Trait Implementations
impl Clone for Message[src]
impl Debug for Message[src]
impl<'de> Deserialize<'de> for Message[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
__D: Deserializer<'de>,
impl Serialize for Message[src]
Auto Trait Implementations
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>, [src]
T: Deserialize<'de>,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,