#[non_exhaustive]pub struct InviteRole {
pub id: RoleId,
pub name: CompactString,
pub position: i32,
pub color: u32,
pub colors: RoleColors,
pub icon: Option<ImageHash>,
pub unicode_emoji: Option<CompactString>,
}Expand description
A role given to users who accept an Invite (D-051).
discord.js counterpart: InviteRole.
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: RoleIdThe role’s ID.
name: CompactStringThe role’s name.
position: i32The role’s position.
color: u32The role’s primary color. Deprecated in favor of colors.
colors: RoleColorsThe role’s colors.
icon: Option<ImageHash>The role icon hash.
unicode_emoji: Option<CompactString>The role’s Unicode emoji.
Trait Implementations§
Source§impl Clone for InviteRole
impl Clone for InviteRole
Source§impl Debug for InviteRole
impl Debug for InviteRole
Source§impl<'de> Deserialize<'de> for InviteRole
impl<'de> Deserialize<'de> for InviteRole
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 InviteRole
Source§impl PartialEq for InviteRole
impl PartialEq for InviteRole
Source§impl Serialize for InviteRole
impl Serialize for InviteRole
impl StructuralPartialEq for InviteRole
Auto Trait Implementations§
impl Freeze for InviteRole
impl RefUnwindSafe for InviteRole
impl Send for InviteRole
impl Sync for InviteRole
impl Unpin for InviteRole
impl UnsafeUnpin for InviteRole
impl UnwindSafe for InviteRole
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