pub struct Role<'a> {
pub id: Snowflake,
pub name: TitanString<'a>,
pub color: u32,
pub hoist: bool,
pub icon: Option<TitanString<'a>>,
pub unicode_emoji: Option<TitanString<'a>>,
pub position: i32,
pub permissions: Permissions,
pub managed: bool,
pub mentionable: bool,
pub tags: Option<RoleTags>,
pub flags: u64,
}Expand description
A Discord role.
Fields§
§id: SnowflakeRole ID.
name: TitanString<'a>Role name.
color: u32Integer representation of hex color code.
hoist: boolIf this role is pinned in the user listing.
icon: Option<TitanString<'a>>Role icon hash.
unicode_emoji: Option<TitanString<'a>>Role unicode emoji.
position: i32Position of this role.
permissions: PermissionsPermission bit set.
managed: boolWhether this role is managed by an integration.
mentionable: boolWhether this role is mentionable.
The tags this role has.
flags: u64Role flags as a bitfield.
Trait Implementations§
Source§impl<'de, 'a> Deserialize<'de> for Role<'a>
impl<'de, 'a> Deserialize<'de> for Role<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for Role<'a>
impl<'a> RefUnwindSafe for Role<'a>
impl<'a> Send for Role<'a>
impl<'a> Sync for Role<'a>
impl<'a> Unpin for Role<'a>
impl<'a> UnwindSafe for Role<'a>
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