pub struct InteractionResponse<'a> {
pub response_type: InteractionCallbackType,
pub data: Option<InteractionCallbackData<'a>>,
}Expand description
Response to an interaction.
Fields§
§response_type: InteractionCallbackTypeResponse type.
data: Option<InteractionCallbackData<'a>>Response data.
Implementations§
Source§impl<'a> InteractionResponse<'a>
impl<'a> InteractionResponse<'a>
Sourcepub fn builder() -> InteractionResponseBuilder<'a>
pub fn builder() -> InteractionResponseBuilder<'a>
Create a builder for an InteractionResponse.
Sourcepub fn reply(
content: impl Into<TitanString<'a>>,
) -> InteractionResponseBuilder<'a>
pub fn reply( content: impl Into<TitanString<'a>>, ) -> InteractionResponseBuilder<'a>
Shortcut to create a simple reply.
Sourcepub fn deferred() -> InteractionResponseBuilder<'a>
pub fn deferred() -> InteractionResponseBuilder<'a>
Shortcut for a deferred response (think “loading…”).
Trait Implementations§
Source§impl<'a> Clone for InteractionResponse<'a>
impl<'a> Clone for InteractionResponse<'a>
Source§fn clone(&self) -> InteractionResponse<'a>
fn clone(&self) -> InteractionResponse<'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 InteractionResponse<'a>
impl<'a> Debug for InteractionResponse<'a>
Source§impl<'de, 'a> Deserialize<'de> for InteractionResponse<'a>
impl<'de, 'a> Deserialize<'de> for InteractionResponse<'a>
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<InteractionResponse<'a>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<InteractionResponse<'a>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> From<InteractionResponseBuilder<'a>> for InteractionResponse<'a>
impl<'a> From<InteractionResponseBuilder<'a>> for InteractionResponse<'a>
Source§fn from(builder: InteractionResponseBuilder<'a>) -> InteractionResponse<'a>
fn from(builder: InteractionResponseBuilder<'a>) -> InteractionResponse<'a>
Converts to this type from the input type.
Source§impl<'a> Serialize for InteractionResponse<'a>
impl<'a> Serialize for InteractionResponse<'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 InteractionResponse<'a>
impl<'a> RefUnwindSafe for InteractionResponse<'a>
impl<'a> Send for InteractionResponse<'a>
impl<'a> Sync for InteractionResponse<'a>
impl<'a> Unpin for InteractionResponse<'a>
impl<'a> UnwindSafe for InteractionResponse<'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