Struct twilight_interactions::command::ResolvedUser
source · pub struct ResolvedUser {
pub resolved: User,
pub member: Option<InteractionMember>,
}Expand description
A resolved Discord user.
This struct implements CommandOption and can be used to
obtain resolved data for a given user ID. The struct holds
a User and maybe an InteractionMember.
Fields§
§resolved: UserThe resolved user.
member: Option<InteractionMember>The resolved member, if found.
Trait Implementations§
source§impl Clone for ResolvedUser
impl Clone for ResolvedUser
source§fn clone(&self) -> ResolvedUser
fn clone(&self) -> ResolvedUser
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 ResolvedUser
impl CommandOption for ResolvedUser
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 ResolvedUser
impl CreateOption for ResolvedUser
source§fn create_option(data: CreateOptionData) -> CommandOption
fn create_option(data: CreateOptionData) -> CommandOption
Create a
CommandOption from this type.source§impl Debug for ResolvedUser
impl Debug for ResolvedUser
source§impl PartialEq<ResolvedUser> for ResolvedUser
impl PartialEq<ResolvedUser> for ResolvedUser
source§fn eq(&self, other: &ResolvedUser) -> bool
fn eq(&self, other: &ResolvedUser) -> bool
This method tests for
self and other values to be equal, and is used
by ==.