Enum valence_text::color::Color
source · pub enum Color {
Reset,
Rgb(RgbColor),
Named(NamedColor),
}
Expand description
Text color
Variants§
Reset
The default color for the text will be used, which varies by context (in some cases, it’s white; in others, it’s black; in still others, it is a shade of gray that isn’t normally used on text).
Rgb(RgbColor)
RGB Color
Named(NamedColor)
One of the 16 named Minecraft colors
Implementations§
source§impl Color
impl Color
pub const RESET: Self = Self::Reset
pub const AQUA: Self = _
pub const BLACK: Self = _
pub const BLUE: Self = _
pub const DARK_AQUA: Self = _
pub const DARK_BLUE: Self = _
pub const DARK_GRAY: Self = _
pub const DARK_GREEN: Self = _
pub const DARK_PURPLE: Self = _
pub const DARK_RED: Self = _
pub const GOLD: Self = _
pub const GRAY: Self = _
pub const GREEN: Self = _
pub const LIGHT_PURPLE: Self = _
pub const RED: Self = _
pub const WHITE: Self = _
pub const YELLOW: Self = _
Trait Implementations§
source§impl<'de> Deserialize<'de> for Color
impl<'de> Deserialize<'de> for Color
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
source§impl From<NamedColor> for Color
impl From<NamedColor> for Color
source§fn from(value: NamedColor) -> Self
fn from(value: NamedColor) -> Self
Converts to this type from the input type.
source§impl Ord for Color
impl Ord for Color
source§impl PartialOrd for Color
impl PartialOrd for Color
impl Copy for Color
impl Eq for Color
Auto Trait Implementations§
impl Freeze for Color
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnwindSafe for Color
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.