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

pub struct RoleId(pub u64);

An identifier for a Role

Implementations

impl RoleId[src]

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

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

impl RoleId[src]

pub fn created_at(&self) -> DateTime<Utc>[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 AsRef<RoleId> for RoleId[src]

impl Clone for RoleId[src]

impl Copy for RoleId[src]

impl Debug for RoleId[src]

impl Default for RoleId[src]

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

impl Display for RoleId[src]

impl Eq for RoleId[src]

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<Role> for RoleId[src]

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

Gets the Id of a role.

impl From<RoleId> for u64[src]

impl From<RoleId> for i64[src]

impl From<u64> 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]

impl Mentionable for RoleId[src]

impl Ord for RoleId[src]

impl PartialEq<RoleId> for RoleId[src]

impl PartialEq<u64> for RoleId[src]

impl PartialOrd<RoleId> for RoleId[src]

impl Serialize for RoleId[src]

impl StructuralEq for RoleId[src]

impl StructuralPartialEq for RoleId[src]

Auto Trait Implementations

impl RefUnwindSafe for RoleId

impl Send for RoleId

impl Sync for RoleId

impl Unpin for RoleId

impl UnwindSafe for RoleId

Blanket Implementations

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

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

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

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

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

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

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

type Err = <F as FromStr>::Err

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

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

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<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]