pub struct CreateRoleColours { /* private fields */ }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.
Note: 2024-07-05 - tertiary_colour is currently enforced to be set with a specific pair of primary and secondary colours, for current validation see Discord docs.
Implementations§
Source§impl CreateRoleColours
impl CreateRoleColours
pub fn new(primary_colour: Colour) -> Self
Sourcepub fn secondary_colour(self, secondary_colour: Colour) -> Self
pub fn secondary_colour(self, secondary_colour: Colour) -> Self
Sets the secondary colour for this role.
Sourcepub fn tertiary_colour(self, tertiary_colour: Colour) -> Self
pub fn tertiary_colour(self, tertiary_colour: Colour) -> Self
Sets the tertiary colour for this role, see struct documentation for limitations.
Trait Implementations§
Source§impl Clone for CreateRoleColours
impl Clone for CreateRoleColours
Source§fn clone(&self) -> CreateRoleColours
fn clone(&self) -> CreateRoleColours
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 CreateRoleColours
impl Debug for CreateRoleColours
Source§impl Default for CreateRoleColours
impl Default for CreateRoleColours
Source§fn default() -> CreateRoleColours
fn default() -> CreateRoleColours
Returns the “default value” for a type. 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.
Auto Trait Implementations§
impl Freeze for CreateRoleColours
impl RefUnwindSafe for CreateRoleColours
impl Send for CreateRoleColours
impl Sync for CreateRoleColours
impl Unpin for CreateRoleColours
impl UnwindSafe for CreateRoleColours
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