Struct serenity::model::id::RoleId [−][src]
pub struct RoleId(pub u64);
An identifier for a Role
Methods
impl RoleId
[src]
impl RoleId
pub fn find(&self) -> Option<Role>
[src]
pub fn find(&self) -> Option<Role>
: Use the to_role_cached
-method instead.
Search the cache for the role.
pub fn to_role_cached(self) -> Option<Role>
[src]
pub fn to_role_cached(self) -> Option<Role>
Tries to find the Role
by its Id in the cache.
impl RoleId
[src]
impl RoleId
pub fn created_at(&self) -> NaiveDateTime
[src]
pub fn created_at(&self) -> NaiveDateTime
Retrieves the time that the Id was created at.
pub fn as_u64(&self) -> &u64
[src]
pub fn as_u64(&self) -> &u64
Immutably borrow inner Id.
pub fn as_mut_u64(&mut self) -> &mut u64
[src]
pub fn as_mut_u64(&mut self) -> &mut u64
Mutably borrow inner Id.
Trait Implementations
impl From<Role> for RoleId
[src]
impl From<Role> for RoleId
impl<'a> From<&'a Role> for RoleId
[src]
impl<'a> From<&'a Role> for RoleId
impl Copy for RoleId
[src]
impl Copy for RoleId
impl Clone for RoleId
[src]
impl Clone for RoleId
fn clone(&self) -> RoleId
[src]
fn clone(&self) -> RoleId
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Default for RoleId
[src]
impl Default for RoleId
impl Debug for RoleId
[src]
impl Debug for RoleId
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for RoleId
[src]
impl Eq for RoleId
impl Hash for RoleId
[src]
impl Hash for RoleId
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl PartialOrd for RoleId
[src]
impl PartialOrd for RoleId
fn partial_cmp(&self, other: &RoleId) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &RoleId) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &RoleId) -> bool
[src]
fn lt(&self, other: &RoleId) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &RoleId) -> bool
[src]
fn le(&self, other: &RoleId) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &RoleId) -> bool
[src]
fn gt(&self, other: &RoleId) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &RoleId) -> bool
[src]
fn ge(&self, other: &RoleId) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for RoleId
[src]
impl Ord for RoleId
fn cmp(&self, other: &RoleId) -> Ordering
[src]
fn cmp(&self, other: &RoleId) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl AsRef<RoleId> for RoleId
[src]
impl AsRef<RoleId> for RoleId
impl<'a> From<&'a RoleId> for RoleId
[src]
impl<'a> From<&'a RoleId> for RoleId
impl From<u64> for RoleId
[src]
impl From<u64> for RoleId
impl PartialEq for RoleId
[src]
impl PartialEq for RoleId
fn eq(&self, other: &Self) -> bool
[src]
fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl PartialEq<u64> for RoleId
[src]
impl PartialEq<u64> for RoleId
fn eq(&self, u: &u64) -> bool
[src]
fn eq(&self, u: &u64) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Display for RoleId
[src]
impl Display for RoleId
fn fmt(&self, f: &mut Formatter) -> FmtResult
[src]
fn fmt(&self, f: &mut Formatter) -> FmtResult
Formats the value using the given formatter. Read more
impl<'de> Deserialize<'de> for RoleId
[src]
impl<'de> Deserialize<'de> for RoleId
fn deserialize<D: Deserializer<'de>>(
deserializer: D
) -> StdResult<Self, D::Error>
[src]
fn deserialize<D: Deserializer<'de>>(
deserializer: D
) -> StdResult<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Mentionable for RoleId
[src]
impl Mentionable for RoleId
fn mention(&self) -> String
[src]
fn mention(&self) -> String
Creates a mentionable string, that will be able to notify and/or create a link to the item. Read more
impl FromStr for RoleId
[src]
impl FromStr for RoleId