pub struct FileDisplay {
pub id: Option<i32>,
pub file: UnfurledMediaItem,
pub spoiler: Option<bool>,
}
Expand description
A component displaying an uploaded file as an attachment.
Files are only available in messages.
Fields§
§id: Option<i32>
Optional identifier for the file.
file: UnfurledMediaItem
This unfurled media item is unique in that it only supports attachment
references using the attachment://<filename>
syntax.
spoiler: Option<bool>
Whether the media should be a spoiler (or blurred out). Defaults to false
.
Trait Implementations§
Source§impl Clone for FileDisplay
impl Clone for FileDisplay
Source§fn clone(&self) -> FileDisplay
fn clone(&self) -> FileDisplay
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for FileDisplay
impl Debug for FileDisplay
Source§impl<'de> Deserialize<'de> for FileDisplay
impl<'de> Deserialize<'de> for FileDisplay
Source§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
Source§impl From<FileDisplay> for Component
impl From<FileDisplay> for Component
Source§fn from(file_display: FileDisplay) -> Self
fn from(file_display: FileDisplay) -> Self
Converts to this type from the input type.
Source§impl Hash for FileDisplay
impl Hash for FileDisplay
Source§impl PartialEq for FileDisplay
impl PartialEq for FileDisplay
Source§impl Serialize for FileDisplay
impl Serialize for FileDisplay
impl Eq for FileDisplay
impl StructuralPartialEq for FileDisplay
Auto Trait Implementations§
impl Freeze for FileDisplay
impl RefUnwindSafe for FileDisplay
impl Send for FileDisplay
impl Sync for FileDisplay
impl Unpin for FileDisplay
impl UnwindSafe for FileDisplay
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
Mutably borrows from an owned value. Read more