#[non_exhaustive]pub struct MediaGalleryItem {
pub media: UnfurledMediaItem,
pub description: Option<CompactString>,
pub spoiler: bool,
}Expand description
discord.js counterpart: MediaGalleryItem / MediaGalleryItemBuilder.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.media: UnfurledMediaItemThe image or video (a URL or an attachment:// reference).
description: Option<CompactString>The alt text (max 1024 characters).
spoiler: boolWhether the item is blurred until clicked.
Implementations§
Source§impl MediaGalleryItem
impl MediaGalleryItem
Sourcepub const fn new(media: UnfurledMediaItem) -> Self
pub const fn new(media: UnfurledMediaItem) -> Self
Creates an item.
discord.js counterpart: MediaGalleryItemBuilder (@discordjs/builders).
Trait Implementations§
Source§impl Clone for MediaGalleryItem
impl Clone for MediaGalleryItem
Source§impl Debug for MediaGalleryItem
impl Debug for MediaGalleryItem
Source§impl<'de> Deserialize<'de> for MediaGalleryItem
impl<'de> Deserialize<'de> for MediaGalleryItem
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
impl Eq for MediaGalleryItem
Source§impl PartialEq for MediaGalleryItem
impl PartialEq for MediaGalleryItem
Source§impl Serialize for MediaGalleryItem
impl Serialize for MediaGalleryItem
impl StructuralPartialEq for MediaGalleryItem
Auto Trait Implementations§
impl Forget for MediaGalleryItem
impl Freeze for MediaGalleryItem
impl Move for MediaGalleryItem
impl RefUnwindSafe for MediaGalleryItem
impl Send for MediaGalleryItem
impl Sync for MediaGalleryItem
impl Unpin for MediaGalleryItem
impl UnsafeUnpin for MediaGalleryItem
impl UnwindSafe for MediaGalleryItem
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