[][src]Struct serenity::model::id::RoleId

pub struct RoleId(pub u64);

An identifier for a Role

Methods

impl RoleId[src]

pub fn to_role_cached(self, cache: impl AsRef<CacheRwLock>) -> Option<Role>[src]

Tries to find the Role by its Id in the cache.

impl RoleId[src]

pub fn created_at(&self) -> NaiveDateTime[src]

Retrieves the time that the Id was created at.

pub fn as_u64(&self) -> &u64[src]

Immutably borrow inner Id.

pub fn as_mut_u64(&mut self) -> &mut u64[src]

Mutably borrow inner Id.

Trait Implementations

impl Mentionable for RoleId[src]

impl AsRef<RoleId> for RoleId[src]

impl Default for RoleId[src]

impl Clone for RoleId[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Ord for RoleId[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl From<Role> for RoleId[src]

fn from(role: Role) -> RoleId[src]

Gets the Id of a role.

impl<'a> From<&'a Role> for RoleId[src]

fn from(role: &Role) -> RoleId[src]

Gets the Id of a role.

impl<'a> From<&'a RoleId> for RoleId[src]

impl From<u64> for RoleId[src]

impl From<RoleId> for u64[src]

impl From<RoleId> for i64[src]

impl Eq for RoleId[src]

impl Copy for RoleId[src]

impl PartialOrd<RoleId> for RoleId[src]

impl PartialEq<RoleId> for RoleId[src]

impl PartialEq<u64> for RoleId[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Debug for RoleId[src]

impl Display for RoleId[src]

impl FromStr for RoleId[src]

type Err = RoleIdParseError

The associated error which can be returned from parsing.

impl Hash for RoleId[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Serialize for RoleId[src]

impl<'de> Deserialize<'de> for RoleId[src]

Auto Trait Implementations

impl Send for RoleId

impl Sync for RoleId

Blanket Implementations

impl<F> FromStrAndCache for F where
    F: FromStr
[src]

type Err = <F as FromStr>::Err

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Erased for T

impl<'a, T> TryFrom<&'a str> for T where
    T: FromStr

type Err = <T as FromStr>::Err

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err

impl<T> DebugAny for T where
    T: Any + Debug
[src]

impl<T> CloneAny for T where
    T: Clone + Any
[src]

impl<T> UnsafeAny for T where
    T: Any