pub struct InteractionData<'a> {
pub id: Option<Snowflake>,
pub name: Option<TitanString<'a>>,
pub command_type: Option<CommandType>,
pub resolved: Option<ResolvedData<'a>>,
pub options: Vec<InteractionDataOption<'a>>,
pub custom_id: Option<TitanString<'a>>,
pub component_type: Option<ComponentType>,
pub values: Vec<String>,
pub target_id: Option<Snowflake>,
pub components: Vec<Value>,
}Expand description
Data payload for an interaction.
Fields§
§id: Option<Snowflake>ID of the invoked command/component.
name: Option<TitanString<'a>>Name of the invoked command.
command_type: Option<CommandType>Command type.
resolved: Option<ResolvedData<'a>>Resolved data (users/roles/channels).
options: Vec<InteractionDataOption<'a>>Parameters/Options.
custom_id: Option<TitanString<'a>>Custom ID (for components/modals).
component_type: Option<ComponentType>Component type (for components).
values: Vec<String>Selected values (for select menus).
target_id: Option<Snowflake>Target ID (for context menus).
components: Vec<Value>Components (for modals).
Trait Implementations§
Source§impl<'a> Clone for InteractionData<'a>
impl<'a> Clone for InteractionData<'a>
Source§fn clone(&self) -> InteractionData<'a>
fn clone(&self) -> InteractionData<'a>
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<'a> Debug for InteractionData<'a>
impl<'a> Debug for InteractionData<'a>
Source§impl<'de, 'a> Deserialize<'de> for InteractionData<'a>
impl<'de, 'a> Deserialize<'de> for InteractionData<'a>
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<InteractionData<'a>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<InteractionData<'a>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> Serialize for InteractionData<'a>
impl<'a> Serialize for InteractionData<'a>
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for InteractionData<'a>
impl<'a> RefUnwindSafe for InteractionData<'a>
impl<'a> Send for InteractionData<'a>
impl<'a> Sync for InteractionData<'a>
impl<'a> Unpin for InteractionData<'a>
impl<'a> UnwindSafe for InteractionData<'a>
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