Struct matrix_sdk::ruma::events::room::message::VideoMessageEventContent
#[non_exhaustive]pub struct VideoMessageEventContent {
pub body: String,
pub formatted: Option<FormattedBody>,
pub filename: Option<String>,
pub source: MediaSource,
pub info: Option<Box<VideoInfo>>,
}
Expand description
The payload for a video message.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.body: String
A description of the video.
If the filename
field is not set or has the same value, this is the filename of the
uploaded file. Otherwise, this should be interpreted as a user-written media caption.
formatted: Option<FormattedBody>
Formatted form of the message body
.
This should only be set if the body represents a caption.
filename: Option<String>
The original filename of the uploaded file.
source: MediaSource
The source of the video clip.
info: Option<Box<VideoInfo>>
Metadata about the video clip referred to in source
.
Implementations§
§impl VideoMessageEventContent
impl VideoMessageEventContent
pub fn new(body: String, source: MediaSource) -> VideoMessageEventContent
pub fn new(body: String, source: MediaSource) -> VideoMessageEventContent
Creates a new VideoMessageEventContent
with the given body and source.
pub fn plain(body: String, url: OwnedMxcUri) -> VideoMessageEventContent
pub fn plain(body: String, url: OwnedMxcUri) -> VideoMessageEventContent
Creates a new non-encrypted VideoMessageEventContent
with the given body and url.
pub fn encrypted(body: String, file: EncryptedFile) -> VideoMessageEventContent
pub fn encrypted(body: String, file: EncryptedFile) -> VideoMessageEventContent
Creates a new encrypted VideoMessageEventContent
with the given body and encrypted
file.
pub fn info(
self,
info: impl Into<Option<Box<VideoInfo>>>
) -> VideoMessageEventContent
pub fn info( self, info: impl Into<Option<Box<VideoInfo>>> ) -> VideoMessageEventContent
Creates a new VideoMessageEventContent
from self
with the info
field set to the given
value.
Since the field is public, you can also assign to it directly. This method merely acts as a shorthand for that, because it is very common to set this field.
Trait Implementations§
§impl Clone for VideoMessageEventContent
impl Clone for VideoMessageEventContent
§fn clone(&self) -> VideoMessageEventContent
fn clone(&self) -> VideoMessageEventContent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for VideoMessageEventContent
impl Debug for VideoMessageEventContent
§impl<'de> Deserialize<'de> for VideoMessageEventContent
impl<'de> Deserialize<'de> for VideoMessageEventContent
§fn deserialize<__D>(
__deserializer: __D
) -> Result<VideoMessageEventContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<VideoMessageEventContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl MediaEventContent for VideoMessageEventContent
impl MediaEventContent for VideoMessageEventContent
source§fn thumbnail_source(&self) -> Option<MediaSource>
fn thumbnail_source(&self) -> Option<MediaSource>
Self
. Read more§impl Serialize for VideoMessageEventContent
impl Serialize for VideoMessageEventContent
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl RefUnwindSafe for VideoMessageEventContent
impl Send for VideoMessageEventContent
impl Sync for VideoMessageEventContent
impl Unpin for VideoMessageEventContent
impl UnwindSafe for VideoMessageEventContent
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§fn clone_handle(handle: Handle) -> Handle
fn clone_handle(handle: Handle) -> Handle
§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Arc<>