#[non_exhaustive]pub enum Mentionable<'a> {
User {
user: &'a User,
member: Option<&'a InteractionMember>,
},
Role(&'a Role),
}Expand description
A user or a role chosen in a mentionable option or select menu, with its resolved data.
discord.js counterpart: the User, GuildMember or Role returned by
CommandInteractionOptionResolver#getMentionable.
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.
User
A user.
Fields
§
member: Option<&'a InteractionMember>Their member data, when chosen in a guild.
Role(&'a Role)
A role.
Implementations§
Trait Implementations§
Source§impl<'a> Clone for Mentionable<'a>
impl<'a> Clone for Mentionable<'a>
impl<'a> Copy for Mentionable<'a>
Source§impl<'a> Debug for Mentionable<'a>
impl<'a> Debug for Mentionable<'a>
impl<'a> Eq for Mentionable<'a>
Source§impl<'a> PartialEq for Mentionable<'a>
impl<'a> PartialEq for Mentionable<'a>
impl<'a> StructuralPartialEq for Mentionable<'a>
Auto Trait Implementations§
impl<'a> Freeze for Mentionable<'a>
impl<'a> RefUnwindSafe for Mentionable<'a>
impl<'a> Send for Mentionable<'a>
impl<'a> Sync for Mentionable<'a>
impl<'a> Unpin for Mentionable<'a>
impl<'a> UnsafeUnpin for Mentionable<'a>
impl<'a> UnwindSafe for Mentionable<'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