Struct twilight_interactions::command::ResolvedUser
source · [−]pub struct ResolvedUser {
pub resolved: User,
pub member: Option<InteractionMember>,
}
Expand description
A resolved Discord user.
This struct implement 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: User
The resolved user.
member: Option<InteractionMember>
The resolved member, if found.
Trait Implementations
sourceimpl Clone for ResolvedUser
impl Clone for ResolvedUser
sourcefn clone(&self) -> ResolvedUser
fn clone(&self) -> ResolvedUser
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl CommandOption for ResolvedUser
impl CommandOption for ResolvedUser
sourcefn 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.
sourceimpl CreateOption for ResolvedUser
impl CreateOption for ResolvedUser
sourcefn create_option(data: CreateOptionData) -> CommandOption
fn create_option(data: CreateOptionData) -> CommandOption
Create a CommandOption
from this type.
sourceimpl Debug for ResolvedUser
impl Debug for ResolvedUser
sourceimpl PartialEq<ResolvedUser> for ResolvedUser
impl PartialEq<ResolvedUser> for ResolvedUser
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &ResolvedUser) -> bool
fn ne(&self, other: &ResolvedUser) -> bool
This method tests for !=
.
impl Eq for ResolvedUser
impl StructuralEq for ResolvedUser
impl StructuralPartialEq for ResolvedUser
Auto Trait Implementations
impl RefUnwindSafe for ResolvedUser
impl Send for ResolvedUser
impl Sync for ResolvedUser
impl Unpin for ResolvedUser
impl UnwindSafe for ResolvedUser
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more