#[non_exhaustive]pub struct Container {
pub id: Option<i32>,
pub components: Vec<Component>,
pub accent_color: Option<u32>,
pub spoiler: bool,
}Expand description
A container: a visually grouped box of components with an optional accent color, like an embed. Messages only.
discord.js counterpart: ContainerComponent / ContainerBuilder.
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).
components: Vec<Component>The action rows, text displays, sections, media galleries, separators and files inside.
accent_color: Option<u32>The accent color on the left, as an RGB integer.
spoiler: boolWhether the container is blurred until clicked.
Implementations§
Trait Implementations§
impl Eq for Container
impl StructuralPartialEq for Container
Auto Trait Implementations§
impl Forget for Container
impl Freeze for Container
impl Move for Container
impl RefUnwindSafe for Container
impl Send for Container
impl Sync for Container
impl Unpin for Container
impl UnsafeUnpin for Container
impl UnwindSafe for Container
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