pub enum ModalInteractionComponent {
Label(ModalInteractionLabel),
ActionRow(ModalInteractionActionRow),
StringSelect(ModalInteractionStringSelect),
UserSelect(ModalInteractionUserSelect),
RoleSelect(ModalInteractionRoleSelect),
MentionableSelect(ModalInteractionMentionableSelect),
ChannelSelect(ModalInteractionChannelSelect),
TextInput(ModalInteractionTextInput),
TextDisplay(ModalInteractionTextDisplay),
FileUpload(ModalInteractionFileUpload),
Unknown(u8),
}Expand description
User filled in modal component.
Variants§
Label(ModalInteractionLabel)
Top-level layout component including a string label and optional description.
ActionRow(ModalInteractionActionRow)
Top-level layout component. In modals, layout components are preferred over action rows.
StringSelect(ModalInteractionStringSelect)
Dropdown selection component for text.
UserSelect(ModalInteractionUserSelect)
Dropdown selection component for users.
RoleSelect(ModalInteractionRoleSelect)
Dropdown selection component for roles.
MentionableSelect(ModalInteractionMentionableSelect)
Dropdown selection component for mentionables.
ChannelSelect(ModalInteractionChannelSelect)
Dropdown selection component for channels.
TextInput(ModalInteractionTextInput)
Text input component.
TextDisplay(ModalInteractionTextDisplay)
Markdown text.
FileUpload(ModalInteractionFileUpload)
File upload component.
Unknown(u8)
Variant value is unknown to the library in the context of modals.
Implementations§
Source§impl ModalInteractionComponent
impl ModalInteractionComponent
Sourcepub fn kind(&self) -> ComponentType
pub fn kind(&self) -> ComponentType
Type of component that this is.
Trait Implementations§
Source§impl Clone for ModalInteractionComponent
impl Clone for ModalInteractionComponent
Source§fn clone(&self) -> ModalInteractionComponent
fn clone(&self) -> ModalInteractionComponent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModalInteractionComponent
impl Debug for ModalInteractionComponent
Source§impl<'de> Deserialize<'de> for ModalInteractionComponent
impl<'de> Deserialize<'de> for ModalInteractionComponent
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
Source§impl From<ModalInteractionActionRow> for ModalInteractionComponent
impl From<ModalInteractionActionRow> for ModalInteractionComponent
Source§fn from(action_row: ModalInteractionActionRow) -> Self
fn from(action_row: ModalInteractionActionRow) -> Self
Converts to this type from the input type.
Source§impl From<ModalInteractionFileUpload> for ModalInteractionComponent
impl From<ModalInteractionFileUpload> for ModalInteractionComponent
Source§fn from(file_upload: ModalInteractionFileUpload) -> Self
fn from(file_upload: ModalInteractionFileUpload) -> Self
Converts to this type from the input type.
Source§impl From<ModalInteractionLabel> for ModalInteractionComponent
impl From<ModalInteractionLabel> for ModalInteractionComponent
Source§fn from(label: ModalInteractionLabel) -> Self
fn from(label: ModalInteractionLabel) -> Self
Converts to this type from the input type.
Source§impl From<ModalInteractionTextDisplay> for ModalInteractionComponent
impl From<ModalInteractionTextDisplay> for ModalInteractionComponent
Source§fn from(text_display: ModalInteractionTextDisplay) -> Self
fn from(text_display: ModalInteractionTextDisplay) -> Self
Converts to this type from the input type.
Source§impl From<ModalInteractionTextInput> for ModalInteractionComponent
impl From<ModalInteractionTextInput> for ModalInteractionComponent
Source§fn from(text_input: ModalInteractionTextInput) -> Self
fn from(text_input: ModalInteractionTextInput) -> Self
Converts to this type from the input type.
impl Eq for ModalInteractionComponent
impl StructuralPartialEq for ModalInteractionComponent
Auto Trait Implementations§
impl Freeze for ModalInteractionComponent
impl RefUnwindSafe for ModalInteractionComponent
impl Send for ModalInteractionComponent
impl Sync for ModalInteractionComponent
impl Unpin for ModalInteractionComponent
impl UnwindSafe for ModalInteractionComponent
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