#[non_exhaustive]pub struct MediaGallery {
pub id: Option<i32>,
pub items: Vec<MediaGalleryItem>,
}Expand description
A media gallery: 1-10 images or videos in a grid.
discord.js counterpart: MediaGalleryComponent / MediaGalleryBuilder.
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.id: Option<i32>The component’s numeric identifier (generated by Discord when not set).
items: Vec<MediaGalleryItem>The items (1-10).
Implementations§
Source§impl MediaGallery
impl MediaGallery
Sourcepub const fn new(items: Vec<MediaGalleryItem>) -> Self
pub const fn new(items: Vec<MediaGalleryItem>) -> Self
Creates a media gallery.
discord.js counterpart: MediaGalleryBuilder (@discordjs/builders).
Trait Implementations§
Source§impl Clone for MediaGallery
impl Clone for MediaGallery
Source§impl Debug for MediaGallery
impl Debug for MediaGallery
impl Eq for MediaGallery
Source§impl From<MediaGallery> for Component
impl From<MediaGallery> for Component
Source§fn from(component: MediaGallery) -> Self
fn from(component: MediaGallery) -> Self
Converts to this type from the input type.
Source§impl PartialEq for MediaGallery
impl PartialEq for MediaGallery
Source§impl Serialize for MediaGallery
impl Serialize for MediaGallery
impl StructuralPartialEq for MediaGallery
Auto Trait Implementations§
impl Freeze for MediaGallery
impl RefUnwindSafe for MediaGallery
impl Send for MediaGallery
impl Sync for MediaGallery
impl Unpin for MediaGallery
impl UnsafeUnpin for MediaGallery
impl UnwindSafe for MediaGallery
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