pub struct CachedRole {Show 13 fields
pub guild_id: Id<GuildMarker>,
pub user_id: Option<Id<UserMarker>>,
pub color: u32,
pub hoist: bool,
pub icon: Option<ImageHash>,
pub id: Id<RoleMarker>,
pub managed: bool,
pub mentionable: bool,
pub name: String,
pub permissions: Permissions,
pub position: i64,
pub tags: Option<RoleTags>,
pub unicode_emoji: Option<String>,
}Expand description
A cached emoji
It’s the same as twilight_model::guild::Role except:
-
guild_idfield is added, making it possible to return a guild’s roles -
user_idfield is added, making it possible to return a member’s roles
Fields§
§guild_id: Id<GuildMarker>§user_id: Option<Id<UserMarker>>§color: u32§hoist: bool§icon: Option<ImageHash>§id: Id<RoleMarker>§managed: bool§mentionable: bool§name: String§permissions: Permissions§position: i64§unicode_emoji: Option<String>Implementations§
Source§impl CachedRole
impl CachedRole
Sourcepub fn from_role(role: Role, guild_id: Id<GuildMarker>) -> Self
pub fn from_role(role: Role, guild_id: Id<GuildMarker>) -> Self
Create a cached role from a given role and guild ID
Trait Implementations§
Source§impl Clone for CachedRole
impl Clone for CachedRole
Source§fn clone(&self) -> CachedRole
fn clone(&self) -> CachedRole
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CachedRole
impl RefUnwindSafe for CachedRole
impl Send for CachedRole
impl Sync for CachedRole
impl Unpin for CachedRole
impl UnwindSafe for CachedRole
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more