#[repr(u8)]pub enum Color {
White = 1,
Blue = 2,
Black = 4,
Red = 8,
Green = 16,
}Expand description
Individual MTG colors, matching Java MagicColor byte constants.
Variants§
Implementations§
Source§impl Color
impl Color
pub const ALL: [Color; 5]
pub fn short_name(self) -> &'static str
pub fn long_name(self) -> &'static str
pub fn symbol(self) -> &'static str
pub fn basic_land_type(self) -> &'static str
pub fn mask(self) -> u8
pub fn from_char(c: char) -> Option<Color>
pub fn from_name(s: &str) -> Option<Color>
Trait Implementations§
impl Copy for Color
Source§impl<'de> Deserialize<'de> for Color
impl<'de> Deserialize<'de> for Color
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 Color
impl StructuralPartialEq 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 UnsafeUnpin 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