pub enum AmbiguousToken {
Attack {},
Counter {},
Exile {},
Gain {},
Type {},
}Expand description
Tokens that can have different meanings depending on the context.
They are regrouped under a special “ambiguous” token kind, that we always parse first. This allows us to know that they will be parsed under this token kind, and not under and ambiguous token kind.
Variants§
Attack
Ambiguous between the player action and the creature action.
Counter
Counter can either be a counter that we put on a permanent, or the action to counter a spell.
Exile
Exile can either refer to the exile zone, or to the action of exiling something.
Gain
Creatures can gain abilities Players can gain life, gain control
Type
Type can be from a card Or for mana type
Implementations§
Source§impl AmbiguousToken
impl AmbiguousToken
pub fn try_from_span(span: &Span<'_>) -> Option<Self>
Trait Implementations§
Source§impl Clone for AmbiguousToken
impl Clone for AmbiguousToken
Source§fn clone(&self) -> AmbiguousToken
fn clone(&self) -> AmbiguousToken
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 AmbiguousToken
impl Debug for AmbiguousToken
Source§impl<'de> Deserialize<'de> for AmbiguousToken
impl<'de> Deserialize<'de> for AmbiguousToken
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
Source§impl Hash for AmbiguousToken
impl Hash for AmbiguousToken
Source§impl Idris for AmbiguousToken
impl Idris for AmbiguousToken
Source§impl Ord for AmbiguousToken
impl Ord for AmbiguousToken
Source§fn cmp(&self, other: &AmbiguousToken) -> Ordering
fn cmp(&self, other: &AmbiguousToken) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for AmbiguousToken
impl PartialEq for AmbiguousToken
Source§impl PartialOrd for AmbiguousToken
impl PartialOrd for AmbiguousToken
Source§impl Serialize for AmbiguousToken
impl Serialize for AmbiguousToken
impl Copy for AmbiguousToken
impl Eq for AmbiguousToken
impl StructuralPartialEq for AmbiguousToken
Auto Trait Implementations§
impl Freeze for AmbiguousToken
impl RefUnwindSafe for AmbiguousToken
impl Send for AmbiguousToken
impl Sync for AmbiguousToken
impl Unpin for AmbiguousToken
impl UnwindSafe for AmbiguousToken
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