#[non_exhaustive]pub struct Label {
pub id: Option<i32>,
pub label: CompactString,
pub description: Option<CompactString>,
pub component: Box<Component>,
}Expand description
A label: a title and description for one input in a modal (text input, select menu, file upload, radio group, checkbox group or checkbox).
discord.js counterpart: LabelComponent / LabelBuilder.
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).
label: CompactStringThe label text (max 45 characters).
description: Option<CompactString>An additional description (max 100 characters).
component: Box<Component>The labelled input.
Implementations§
Trait Implementations§
impl Eq for Label
impl StructuralPartialEq for Label
Auto Trait Implementations§
impl Forget for Label
impl Freeze for Label
impl Move for Label
impl RefUnwindSafe for Label
impl Send for Label
impl Sync for Label
impl Unpin for Label
impl UnsafeUnpin for Label
impl UnwindSafe for Label
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