CacheableRole

Trait CacheableRole 

Source
pub trait CacheableRole:
    From<Role>
    + PartialEq<Role>
    + PartialEq<Self>
    + Clone
    + Debug {
    // Required methods
    fn position(&self) -> i64;
    fn id(&self) -> Id<RoleMarker>;
    fn permissions(&self) -> Permissions;
}
Expand description

Trait for a generic cached representation of a Role.

Required Methods§

Source

fn position(&self) -> i64

Role’s position in the guild roles.

Source

fn id(&self) -> Id<RoleMarker>

ID of the role.

Source

fn permissions(&self) -> Permissions

Available on crate feature permission-calculator only.

Permissions granted to members with the role.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl CacheableRole for Role

Source§

fn position(&self) -> i64

Source§

fn id(&self) -> Id<RoleMarker>

Source§

fn permissions(&self) -> Permissions

Available on crate feature permission-calculator only.

Implementors§