pub enum FollowupResponse {
Deserialized(Message),
None,
NotDeserialized(Response<Message>),
}Expand description
Response returned from responding to an interaction
Variants§
Deserialized(Message)
The response is already deserialized
None
The response is empty
NotDeserialized(Response<Message>)
The response is not deserialized
Implementations§
Source§impl FollowupResponse
impl FollowupResponse
Sourcepub async fn model(self) -> Result<Option<Message>, Error>
pub async fn model(self) -> Result<Option<Message>, Error>
Returns the response’s message.
Deserializes the message if it’s not already deserialized.
Returns None if the response is of variant FollowupResponse::None.
§Errors
Returns Error::DeserializeBody if the response is of variant
FollowupResponse::NotDeserialized and the response couldn’t be
deserialized.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FollowupResponse
impl !RefUnwindSafe for FollowupResponse
impl Send for FollowupResponse
impl Sync for FollowupResponse
impl Unpin for FollowupResponse
impl !UnwindSafe for FollowupResponse
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