Skip to main content

ManaAtom

Struct ManaAtom 

Source
pub struct ManaAtom;
Expand description

Bitmask constants for mana atoms, matching Java ManaAtom. Each bit represents a property of a mana symbol.

Implementations§

Source§

impl ManaAtom

Source

pub const WHITE: u16 = 1

Source

pub const BLUE: u16 = 2

Source

pub const BLACK: u16 = 4

Source

pub const RED: u16 = 8

Source

pub const GREEN: u16 = 16

Source

pub const COLORLESS: u16 = 32

Source

pub const GENERIC: u16 = 64

Source

pub const IS_X: u16 = 256

Source

pub const OR_2_GENERIC: u16 = 512

Source

pub const OR_2_LIFE: u16 = 1024

Source

pub const IS_SNOW: u16 = 2048

Source

pub const ALL_MANA_COLORS: u16

Source

pub const ALL_MANA_TYPES: u16

Source

pub const COLORS_SUPERPOSITION: u16 = Self::ALL_MANA_COLORS

Source

pub fn from_name(name: &str) -> u16

Convert a color name (lowercase) to its atom bitmask.

Source

pub fn from_char(c: char) -> u16

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V