pub struct RoleColors {
pub primary_color: u32,
pub secondary_color: Option<u32>,
pub tertiary_color: Option<u32>,
}Expand description
The colors of a role.
A role without colors has primary_color == 0 and does not affect the member’s color.
Secondary and tertiary colors need the guild feature ENHANCED_ROLE_COLORS.
discord.js counterpart: RoleColors (Role#colors).
Fields§
§primary_color: u32The primary color as an RGB integer.
secondary_color: Option<u32>The secondary color: makes the role a gradient between the colors.
tertiary_color: Option<u32>The tertiary color: makes the gradient holographic.
Implementations§
Source§impl RoleColors
impl RoleColors
Sourcepub const HOLOGRAPHIC: Self
pub const HOLOGRAPHIC: Self
The only colors Discord accepts for a holographic role (when a tertiary color is sent).
discord.js counterpart: Constants.HolographicStyle.
Trait Implementations§
Source§impl Clone for RoleColors
impl Clone for RoleColors
impl Copy for RoleColors
Source§impl Debug for RoleColors
impl Debug for RoleColors
Source§impl Default for RoleColors
impl Default for RoleColors
Source§impl<'de> Deserialize<'de> for RoleColors
impl<'de> Deserialize<'de> for RoleColors
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 RoleColors
Source§impl Hash for RoleColors
impl Hash for RoleColors
Source§impl PartialEq for RoleColors
impl PartialEq for RoleColors
Source§impl Serialize for RoleColors
impl Serialize for RoleColors
impl StructuralPartialEq for RoleColors
Auto Trait Implementations§
impl Forget for RoleColors
impl Freeze for RoleColors
impl Move for RoleColors
impl RefUnwindSafe for RoleColors
impl Send for RoleColors
impl Sync for RoleColors
impl Unpin for RoleColors
impl UnsafeUnpin for RoleColors
impl UnwindSafe for RoleColors
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