#[non_exhaustive]pub struct CreateGuildRole {
pub name: Option<CompactString>,
pub permissions: Option<Permissions>,
pub colors: Option<RoleColors>,
pub hoist: bool,
pub icon: Option<ImageData>,
pub unicode_emoji: Option<CompactString>,
pub mentionable: bool,
}Expand description
The body of Create Guild Role.
Every field is optional (Discord’s defaults: new role, the @everyone permissions, no
color).
discord.js counterpart: RoleCreateOptions.
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.name: Option<CompactString>The name (max 100 characters).
permissions: Option<Permissions>The permissions.
colors: Option<RoleColors>The colors.
hoist: boolWhether members with the role are shown separately in the member list.
icon: Option<ImageData>The icon (needs the ROLE_ICONS feature).
unicode_emoji: Option<CompactString>A Unicode emoji as the icon (needs the ROLE_ICONS feature).
mentionable: boolWhether everyone can mention the role.
Trait Implementations§
Source§impl Clone for CreateGuildRole
impl Clone for CreateGuildRole
Source§impl Debug for CreateGuildRole
impl Debug for CreateGuildRole
Source§impl Default for CreateGuildRole
impl Default for CreateGuildRole
impl Eq for CreateGuildRole
Source§impl Hash for CreateGuildRole
impl Hash for CreateGuildRole
Source§impl PartialEq for CreateGuildRole
impl PartialEq for CreateGuildRole
Source§impl Serialize for CreateGuildRole
impl Serialize for CreateGuildRole
impl StructuralPartialEq for CreateGuildRole
Auto Trait Implementations§
impl !Freeze for CreateGuildRole
impl Forget for CreateGuildRole
impl Move for CreateGuildRole
impl RefUnwindSafe for CreateGuildRole
impl Send for CreateGuildRole
impl Sync for CreateGuildRole
impl Unpin for CreateGuildRole
impl UnsafeUnpin for CreateGuildRole
impl UnwindSafe for CreateGuildRole
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