#[non_exhaustive]pub struct RoleColours {
pub primary_colour: Colour,
pub secondary_colour: Option<Colour>,
pub tertiary_colour: Option<Colour>,
}Expand description
The colours of a Discord role, secondary_colour and tertiary_colour may only be set if
the Guild has the ENHANCED_ROLE_COLORS feature.
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.primary_colour: Colourthe primary color for the role
secondary_colour: Option<Colour>the secondary color for the role, this will make the role a gradient between the other provided colors
tertiary_colour: Option<Colour>the tertiary color for the role, this will turn the gradient into a holographic style
Trait Implementations§
Source§impl Clone for RoleColours
impl Clone for RoleColours
Source§fn clone(&self) -> RoleColours
fn clone(&self) -> RoleColours
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RoleColours
impl Debug for RoleColours
Source§impl Default for RoleColours
impl Default for RoleColours
Source§fn default() -> RoleColours
fn default() -> RoleColours
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RoleColours
impl<'de> Deserialize<'de> for RoleColours
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
Source§impl From<RoleColours> for CreateRoleColours
impl From<RoleColours> for CreateRoleColours
Source§fn from(c: RoleColours) -> CreateRoleColours
fn from(c: RoleColours) -> CreateRoleColours
Converts to this type from the input type.
Source§impl Serialize for RoleColours
impl Serialize for RoleColours
impl Copy for RoleColours
Auto Trait Implementations§
impl Freeze for RoleColours
impl RefUnwindSafe for RoleColours
impl Send for RoleColours
impl Sync for RoleColours
impl Unpin for RoleColours
impl UnwindSafe for RoleColours
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