pub enum Component {
Show 20 variants
ActionRow(ActionRow),
Button(Button),
StringSelect(StringSelect),
TextInput(TextInput),
UserSelect(EntitySelect),
RoleSelect(EntitySelect),
MentionableSelect(EntitySelect),
ChannelSelect(EntitySelect),
Section(Section),
TextDisplay(TextDisplay),
Thumbnail(Thumbnail),
MediaGallery(MediaGallery),
File(FileComponent),
Separator(Separator),
Container(Container),
Label(Label),
FileUpload(FileUpload),
RadioGroup(RadioGroup),
CheckboxGroup(CheckboxGroup),
Checkbox(Checkbox),
}Expand description
One component (§8.14). The variant is the wire type number.
Variants§
ActionRow(ActionRow)
1: a row of up to five buttons or one select.
Button(Button)
StringSelect(StringSelect)
TextInput(TextInput)
4: modal only, inside a label.
UserSelect(EntitySelect)
RoleSelect(EntitySelect)
MentionableSelect(EntitySelect)
7: members and roles.
ChannelSelect(EntitySelect)
Section(Section)
9: text with a button or thumbnail beside it (V2).
TextDisplay(TextDisplay)
10: markdown text (V2, modal).
Thumbnail(Thumbnail)
11: a small picture, only as a section’s accessory.
MediaGallery(MediaGallery)
12: up to ten pictures (V2).
File(FileComponent)
13: one attached file (V2).
Separator(Separator)
14: space or a line between components (V2).
Container(Container)
17: a box around other components (V2).
Label(Label)
18: a modal field’s label around one input.
FileUpload(FileUpload)
19: files the invoker uploads in a modal.
RadioGroup(RadioGroup)
21: one choice among options, in a modal.
CheckboxGroup(CheckboxGroup)
22: several choices, in a modal.
Checkbox(Checkbox)
23: one yes/no box, in a modal.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Component
impl<'de> Deserialize<'de> for Component
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Component
impl StructuralPartialEq for Component
Auto Trait Implementations§
impl Freeze for Component
impl RefUnwindSafe for Component
impl Send for Component
impl Sync for Component
impl Unpin for Component
impl UnsafeUnpin for Component
impl UnwindSafe for Component
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