pub enum ResolvedMentionable {
User(ResolvedUser),
Role(Role),
}Expand description
A resolved mentionable.
This struct implements CommandOption and can be used to obtain the
resolved data from a mentionable ID, that can be either a user or a role.
Variants§
Implementations§
source§impl ResolvedMentionable
impl ResolvedMentionable
sourcepub fn id(&self) -> Id<GenericMarker>
pub fn id(&self) -> Id<GenericMarker>
Get the ID of the mentionable.
Trait Implementations§
source§impl Clone for ResolvedMentionable
impl Clone for ResolvedMentionable
source§fn clone(&self) -> ResolvedMentionable
fn clone(&self) -> ResolvedMentionable
Returns a copy 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 CommandOption for ResolvedMentionable
impl CommandOption for ResolvedMentionable
source§fn from_option(
value: CommandOptionValue,
_data: CommandOptionData,
resolved: Option<&CommandInteractionDataResolved>
) -> Result<Self, ParseOptionErrorType>
fn from_option( value: CommandOptionValue, _data: CommandOptionData, resolved: Option<&CommandInteractionDataResolved> ) -> Result<Self, ParseOptionErrorType>
Convert a
CommandOptionValue into this value.source§impl CreateOption for ResolvedMentionable
impl CreateOption for ResolvedMentionable
source§fn create_option(data: CreateOptionData) -> CommandOption
fn create_option(data: CreateOptionData) -> CommandOption
Create a
CommandOption from this type.source§impl Debug for ResolvedMentionable
impl Debug for ResolvedMentionable
source§impl PartialEq<ResolvedMentionable> for ResolvedMentionable
impl PartialEq<ResolvedMentionable> for ResolvedMentionable
source§fn eq(&self, other: &ResolvedMentionable) -> bool
fn eq(&self, other: &ResolvedMentionable) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for ResolvedMentionable
impl StructuralEq for ResolvedMentionable
impl StructuralPartialEq for ResolvedMentionable
Auto Trait Implementations§
impl RefUnwindSafe for ResolvedMentionable
impl Send for ResolvedMentionable
impl Sync for ResolvedMentionable
impl Unpin for ResolvedMentionable
impl UnwindSafe for ResolvedMentionable
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