Struct serenity::model::id::UserId [−][src]
pub struct UserId(pub u64);
Expand description
An identifier for a User
Implementations
Retrieves the time that the Id was created at.
Mutably borrow inner Id.
Creates a direct message channel between the current user and the user. This can also retrieve the channel if one already exists.
Errors
Returns Error::Http
if a User
with that UserId
does not exist,
or is otherwise unavailable.
May also return an Error::Json
if there is an error in deserializing
the channel data returned by the Discord API.
Attempts to find a User
by its Id in the cache.
First attempts to find a User
by its Id in the cache,
upon failure requests it via the REST API.
Note: If the cache is not enabled, REST API will be used only.
Errors
May return an Error::Http
if a User
with that UserId
does not exist,
or otherwise cannot be fetched.
May also return an Error::Json
if there is an error in
deserializing the user.
Trait Implementations
Deserialize this value from the given Serde deserializer. Read more
Gets the Id of a CurrentUser
struct.
unstable_discord_api
only.unstable_discord_api
only.Performs the conversion.
Gets the Id of a CurrentUser
struct.
unstable_discord_api
only.This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for UserId
impl UnwindSafe for UserId
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V