[][src]Enum resast::pat::Pat

pub enum Pat<'a> {
    Ident(Ident<'a>),
    Obj(ObjPat<'a>),
    Array(Vec<Option<ArrayPatPart<'a>>>),
    RestElement(Box<Pat<'a>>),
    Assign(AssignPat<'a>),
}

All of the different ways you can declare an identifier and/or value

Variants

Ident(Ident<'a>)
Obj(ObjPat<'a>)
Array(Vec<Option<ArrayPatPart<'a>>>)
RestElement(Box<Pat<'a>>)
Assign(AssignPat<'a>)

Methods

impl<'a> Pat<'a>[src]

pub fn ident_from(s: &'a str) -> Self[src]

Trait Implementations

impl<'a> Clone for Pat<'a>[src]

impl<'a> Debug for Pat<'a>[src]

impl<'a> PartialEq<Pat<'a>> for Pat<'a>[src]

impl<'a> StructuralPartialEq for Pat<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Pat<'a>

impl<'a> Send for Pat<'a>

impl<'a> Sync for Pat<'a>

impl<'a> Unpin for Pat<'a>

impl<'a> UnwindSafe for Pat<'a>

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.