Struct ruma_events::room::message::FileMessageEventContent [−][src]
pub struct FileMessageEventContent { pub body: String, pub filename: Option<String>, pub url: Option<MxcUri>, pub file: Option<Box<EncryptedFile>>, pub info: Option<Box<FileInfo>>, }
Expand description
The payload for a file message.
Fields
body: String
A human-readable description of the file.
This is recommended to be the filename of the original upload.
filename: Option<String>
The original filename of the uploaded file.
url: Option<MxcUri>
The URL to the file.
file: Option<Box<EncryptedFile>>
Information on the encrypted file.
Required if file is encrypted.
info: Option<Box<FileInfo>>
Metadata about the file referred to in url
.
Implementations
Creates a new non-encrypted FileMessageEventContent
with the given body, url and optional
extra info.
Creates a new encrypted FileMessageEventContent
with the given body and encrypted file.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for FileMessageEventContent
impl Send for FileMessageEventContent
impl Sync for FileMessageEventContent
impl Unpin for FileMessageEventContent
impl UnwindSafe for FileMessageEventContent
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V