#[non_exhaustive]pub struct TemplateRole {
pub id: u64,
pub name: CompactString,
pub permissions: Permissions,
pub color: u32,
pub colors: Option<RoleColors>,
pub hoist: bool,
pub icon: Option<ImageHash>,
pub unicode_emoji: Option<CompactString>,
pub mentionable: bool,
}Expand description
A role in a SerializedSourceGuild (D-059).
discord.js counterpart: a role of APITemplateSerializedSourceGuild (discord-api-types).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: u64The placeholder ID (0 is @everyone).
name: CompactStringThe role’s name.
permissions: PermissionsThe role’s permissions.
color: u32The role’s primary color as an RGB integer. Deprecated by Discord in favor of
colors.
colors: Option<RoleColors>The role’s colors.
hoist: boolWhether the role’s members are listed separately.
icon: Option<ImageHash>The role icon hash.
unicode_emoji: Option<CompactString>The role’s Unicode emoji.
mentionable: boolWhether everyone can mention the role.
Trait Implementations§
Source§impl Clone for TemplateRole
impl Clone for TemplateRole
Source§impl Debug for TemplateRole
impl Debug for TemplateRole
Source§impl<'de> Deserialize<'de> for TemplateRole
impl<'de> Deserialize<'de> for TemplateRole
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
impl Eq for TemplateRole
Source§impl PartialEq for TemplateRole
impl PartialEq for TemplateRole
Source§impl Serialize for TemplateRole
impl Serialize for TemplateRole
impl StructuralPartialEq for TemplateRole
Auto Trait Implementations§
impl Forget for TemplateRole
impl Freeze for TemplateRole
impl Move for TemplateRole
impl RefUnwindSafe for TemplateRole
impl Send for TemplateRole
impl Sync for TemplateRole
impl Unpin for TemplateRole
impl UnsafeUnpin for TemplateRole
impl UnwindSafe for TemplateRole
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