#[non_exhaustive]pub enum NameplatePalette {
Crimson,
Berry,
Sky,
Teal,
Forest,
BubbleGum,
Violet,
Cobalt,
Clover,
Lemon,
White,
Unknown(CompactString),
}Expand description
The background color of a Nameplate.
discord.js counterpart: NameplatePalette (discord-api-types).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Crimson
Crimson.
Berry
Berry.
Sky
Sky.
Teal
Teal.
Forest
Forest.
BubbleGum
Bubble gum.
Violet
Violet.
Cobalt
Cobalt (seen in the docs’ example user; not in the documented list).
Clover
Clover.
Undocumented: known from discord-api-types, not in the official docs; may change without notice.
Lemon
Lemon.
Undocumented: known from discord-api-types, not in the official docs; may change without notice.
White
White.
Undocumented: known from discord-api-types, not in the official docs; may change without notice.
Unknown(CompactString)
A value that this version of the library does not know about.
Discord may add new values at any time. They are preserved here so that no
information is lost and deserialization never fails because of them. Prefer
NameplatePalette::from over constructing this variant directly.
Implementations§
Source§impl NameplatePalette
impl NameplatePalette
Sourcepub fn as_str(&self) -> &str
pub fn as_str(&self) -> &str
Returns the string Discord uses for this value.
discord.js counterpart: the enum’s string value in discord-api-types.
Sourcepub const fn is_unknown(&self) -> bool
pub const fn is_unknown(&self) -> bool
Returns true for a value this version of the library does not know about.
discord.js counterpart: none (discord.js passes unknown strings through).
Trait Implementations§
Source§impl AsRef<str> for NameplatePalette
impl AsRef<str> for NameplatePalette
Source§impl Clone for NameplatePalette
impl Clone for NameplatePalette
Source§impl Debug for NameplatePalette
impl Debug for NameplatePalette
Source§impl<'de> Deserialize<'de> for NameplatePalette
impl<'de> Deserialize<'de> for NameplatePalette
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Source§impl Display for NameplatePalette
impl Display for NameplatePalette
impl Eq for NameplatePalette
Source§impl From<&str> for NameplatePalette
impl From<&str> for NameplatePalette
Source§impl Hash for NameplatePalette
impl Hash for NameplatePalette
Source§impl Ord for NameplatePalette
impl Ord for NameplatePalette
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for NameplatePalette
impl PartialEq for NameplatePalette
Source§impl PartialOrd for NameplatePalette
impl PartialOrd for NameplatePalette
Auto Trait Implementations§
impl Forget for NameplatePalette
impl Freeze for NameplatePalette
impl Move for NameplatePalette
impl RefUnwindSafe for NameplatePalette
impl Send for NameplatePalette
impl Sync for NameplatePalette
impl Unpin for NameplatePalette
impl UnsafeUnpin for NameplatePalette
impl UnwindSafe for NameplatePalette
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more