[][src]Enum zeta::parser::ast::PatternData

pub enum PatternData {
    Ignore,
    Identifier(Identifier),
    IdentifierChain(Vec<Identifier>),
    Expression(Expression),
    Tuple(Vec<NamedExpressionPattern>),
    NamedTuple {
        identifier_chain: Vec<Identifier>,
        fields: Vec<NamedExpressionPattern>,
    },
    Struct {
        identifier_chain: Vec<Identifier>,
        fields: Vec<StructPatternField>,
    },
    Else {
        left: Box<Pattern>,
        right: Box<Pattern>,
    },
    Enums {
        identifier_chain: Vec<Identifier>,
        expression: Expression,
    },
}

Variants

IgnoreIdentifier(Identifier)IdentifierChain(Vec<Identifier>)Expression(Expression)Tuple(Vec<NamedExpressionPattern>)NamedTuple

Fields of NamedTuple

identifier_chain: Vec<Identifier>fields: Vec<NamedExpressionPattern>
Struct

Fields of Struct

identifier_chain: Vec<Identifier>fields: Vec<StructPatternField>
Else

Fields of Else

left: Box<Pattern>right: Box<Pattern>
Enums

Fields of Enums

identifier_chain: Vec<Identifier>expression: Expression

Methods

impl PatternData[src]

pub fn is_ignore(&self) -> bool[src]

pub fn is_ident(&self) -> bool[src]

pub fn is_ident_chain(&self) -> bool[src]

pub fn is_ident_or_chain(&self) -> bool[src]

pub fn is_expression(&self) -> bool[src]

pub fn is_tuple(&self) -> bool[src]

pub fn is_named_tuple(&self) -> bool[src]

pub fn is_struct(&self) -> bool[src]

pub fn is_else(&self) -> bool[src]

pub fn extract_ident_or_chain(self) -> Vec<Identifier>[src]

pub fn extract_tuple_fields(self) -> Vec<NamedExpressionPattern>[src]

Trait Implementations

impl Clone for PatternData[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for PatternData[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]