#[non_exhaustive]pub enum InteractionData {
ApplicationCommand(Box<CommandData>),
MessageComponent(Box<MessageComponentInteractionData>),
ModalSubmit(Box<ModalInteractionData>),
}Expand description
Additional Interaction data, such as the invoking user.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ApplicationCommand(Box<CommandData>)
Data received for the ApplicationCommand and ApplicationCommandAutocomplete
interaction types.
MessageComponent(Box<MessageComponentInteractionData>)
Data received for the MessageComponent interaction type.
ModalSubmit(Box<ModalInteractionData>)
Data received for the ModalSubmit interaction type.
Trait Implementations§
Source§impl Clone for InteractionData
impl Clone for InteractionData
Source§impl Debug for InteractionData
impl Debug for InteractionData
Source§impl<'de> Deserialize<'de> for InteractionData
impl<'de> Deserialize<'de> for InteractionData
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<Box<CommandData>> for InteractionData
impl From<Box<CommandData>> for InteractionData
Source§fn from(value: Box<CommandData>) -> Self
fn from(value: Box<CommandData>) -> Self
Converts to this type from the input type.
Source§impl From<Box<MessageComponentInteractionData>> for InteractionData
impl From<Box<MessageComponentInteractionData>> for InteractionData
Source§fn from(value: Box<MessageComponentInteractionData>) -> Self
fn from(value: Box<MessageComponentInteractionData>) -> Self
Converts to this type from the input type.
Source§impl From<Box<ModalInteractionData>> for InteractionData
impl From<Box<ModalInteractionData>> for InteractionData
Source§fn from(value: Box<ModalInteractionData>) -> Self
fn from(value: Box<ModalInteractionData>) -> Self
Converts to this type from the input type.
Source§impl PartialEq for InteractionData
impl PartialEq for InteractionData
Source§impl Serialize for InteractionData
impl Serialize for InteractionData
impl StructuralPartialEq for InteractionData
Source§impl TryFrom<InteractionData> for Box<CommandData>
impl TryFrom<InteractionData> for Box<CommandData>
Source§type Error = InteractionData
type Error = InteractionData
The type returned in the event of a conversion error.
Source§impl TryFrom<InteractionData> for Box<MessageComponentInteractionData>
impl TryFrom<InteractionData> for Box<MessageComponentInteractionData>
Source§type Error = InteractionData
type Error = InteractionData
The type returned in the event of a conversion error.
Source§impl TryFrom<InteractionData> for Box<ModalInteractionData>
impl TryFrom<InteractionData> for Box<ModalInteractionData>
Source§type Error = InteractionData
type Error = InteractionData
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Forget for InteractionData
impl Freeze for InteractionDatawhere
*const CommandData is !null: Freeze,
PhantomData<CommandData>: Freeze,
*const MessageComponentInteractionData is !null: Freeze,
PhantomData<MessageComponentInteractionData>: Freeze,
*const ModalInteractionData is !null: Freeze,
PhantomData<ModalInteractionData>: Freeze,
impl Move for InteractionData
impl RefUnwindSafe for InteractionDatawhere
NonZero<u64>: RefUnwindSafe,
InternalBitFlags: RefUnwindSafe,
InternalBitFlags: RefUnwindSafe,
NonZero<i32>: RefUnwindSafe,
InternalBitFlags: RefUnwindSafe,
InternalBitFlags: RefUnwindSafe,
InternalBitFlags: RefUnwindSafe,
InternalBitFlags: RefUnwindSafe,
InternalBitFlags: RefUnwindSafe,
InternalBitFlags: RefUnwindSafe,
InternalBitFlags: RefUnwindSafe,
InternalBitFlags: RefUnwindSafe,
InternalBitFlags: RefUnwindSafe,
impl Send for InteractionDatawhere
BoxRaw<CommandData>: Send,
BoxRaw<MessageComponentInteractionData>: Send,
BoxRaw<ModalInteractionData>: Send,
impl Sync for InteractionDatawhere
BoxRaw<CommandData>: Sync,
BoxRaw<MessageComponentInteractionData>: Sync,
BoxRaw<ModalInteractionData>: Sync,
impl Unpin for InteractionDatawhere
Box<CommandData>: Unpin,
Box<MessageComponentInteractionData>: Unpin,
Box<ModalInteractionData>: Unpin,
impl UnsafeUnpin for InteractionDatawhere
*const CommandData is !null: UnsafeUnpin,
PhantomData<CommandData>: UnsafeUnpin,
*const MessageComponentInteractionData is !null: UnsafeUnpin,
PhantomData<MessageComponentInteractionData>: UnsafeUnpin,
*const ModalInteractionData is !null: UnsafeUnpin,
PhantomData<ModalInteractionData>: UnsafeUnpin,
impl UnwindSafe for InteractionDatawhere
BoxRaw<CommandData>: UnwindSafe,
BoxRaw<MessageComponentInteractionData>: UnwindSafe,
BoxRaw<ModalInteractionData>: UnwindSafe,
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