Struct ruma_common::events::room::message::VideoMessageEventContent
source · [−]pub struct VideoMessageEventContent {
pub body: String,
pub source: MediaSource,
pub info: Option<Box<VideoInfo>>,
pub message: Option<MessageContent>,
pub file: Option<FileContent>,
pub video: Option<Box<VideoContent>>,
pub thumbnail: Option<Vec<ThumbnailContent>>,
pub caption: Option<MessageContent>,
}
events
only.Expand description
The payload for a video message.
With the unstable-msc3553
feature, this type contains the transitional format of
VideoEventContent
. See the documentation of the message
module for more information.
Fields
body: String
A description of the video, e.g. “Gangnam Style”, or some kind of content description for accessibility, e.g. “video attachment”.
source: MediaSource
The source of the video clip.
info: Option<Box<VideoInfo>>
Metadata about the video clip referred to in source
.
message: Option<MessageContent>
unstable-msc3553
only.Extensible-event text representation of the message.
If present, this should be preferred over the body
field.
file: Option<FileContent>
unstable-msc3553
only.Extensible-event file content of the message.
If present, this should be preferred over the source
and info
fields.
video: Option<Box<VideoContent>>
unstable-msc3553
only.Extensible-event video info of the message.
If present, this should be preferred over the info
field.
thumbnail: Option<Vec<ThumbnailContent>>
unstable-msc3553
only.Extensible-event thumbnails of the message.
If present, this should be preferred over the info
field.
caption: Option<MessageContent>
unstable-msc3553
only.Extensible-event captions of the message.
Implementations
sourceimpl VideoMessageEventContent
impl VideoMessageEventContent
sourcepub fn plain(body: String, url: OwnedMxcUri, info: Option<Box<VideoInfo>>) -> Self
pub fn plain(body: String, url: OwnedMxcUri, info: Option<Box<VideoInfo>>) -> Self
Creates a new non-encrypted VideoMessageEventContent
with the given body, url and
optional extra info.
sourcepub fn encrypted(body: String, file: EncryptedFile) -> Self
pub fn encrypted(body: String, file: EncryptedFile) -> Self
Creates a new encrypted VideoMessageEventContent
with the given body and encrypted
file.
Trait Implementations
sourceimpl Clone for VideoMessageEventContent
impl Clone for VideoMessageEventContent
sourcefn clone(&self) -> VideoMessageEventContent
fn clone(&self) -> VideoMessageEventContent
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more