Enum swc_ecma_ast::ClassMember[][src]

pub enum ClassMember {
    Constructor(Constructor),
    Method(ClassMethod),
    PrivateMethod(PrivateMethod),
    ClassProp(ClassProp),
    PrivateProp(PrivateProp),
    TsIndexSignature(TsIndexSignature),
    Empty(EmptyStmt),
}

Variants

Constructor(Constructor)
Method(ClassMethod)

es2015

PrivateMethod(PrivateMethod)
ClassProp(ClassProp)

stage 0 / Typescript

PrivateProp(PrivateProp)
TsIndexSignature(TsIndexSignature)
Empty(EmptyStmt)

Implementations

impl ClassMember[src]

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

Returns true if self is of variant Constructor.

pub fn expect_constructor(self) -> Constructor where
    Self: Debug
[src]

Unwraps the value, yielding the content of Constructor.

Panics

Panics if the value is not Constructor, with a panic message including the content of self.

pub fn constructor(self) -> Option<Constructor>[src]

Returns Some if self is of variant Constructor, and None otherwise.

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

Returns true if self is of variant Method.

pub fn expect_method(self) -> ClassMethod where
    Self: Debug
[src]

Unwraps the value, yielding the content of Method.

Panics

Panics if the value is not Method, with a panic message including the content of self.

pub fn method(self) -> Option<ClassMethod>[src]

Returns Some if self is of variant Method, and None otherwise.

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

Returns true if self is of variant PrivateMethod.

pub fn expect_private_method(self) -> PrivateMethod where
    Self: Debug
[src]

Unwraps the value, yielding the content of PrivateMethod.

Panics

Panics if the value is not PrivateMethod, with a panic message including the content of self.

pub fn private_method(self) -> Option<PrivateMethod>[src]

Returns Some if self is of variant PrivateMethod, and None otherwise.

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

Returns true if self is of variant ClassProp.

pub fn expect_class_prop(self) -> ClassProp where
    Self: Debug
[src]

Unwraps the value, yielding the content of ClassProp.

Panics

Panics if the value is not ClassProp, with a panic message including the content of self.

pub fn class_prop(self) -> Option<ClassProp>[src]

Returns Some if self is of variant ClassProp, and None otherwise.

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

Returns true if self is of variant PrivateProp.

pub fn expect_private_prop(self) -> PrivateProp where
    Self: Debug
[src]

Unwraps the value, yielding the content of PrivateProp.

Panics

Panics if the value is not PrivateProp, with a panic message including the content of self.

pub fn private_prop(self) -> Option<PrivateProp>[src]

Returns Some if self is of variant PrivateProp, and None otherwise.

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

Returns true if self is of variant TsIndexSignature.

pub fn expect_ts_index_signature(self) -> TsIndexSignature where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsIndexSignature.

Panics

Panics if the value is not TsIndexSignature, with a panic message including the content of self.

pub fn ts_index_signature(self) -> Option<TsIndexSignature>[src]

Returns Some if self is of variant TsIndexSignature, and None otherwise.

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

Returns true if self is of variant Empty.

pub fn expect_empty(self) -> EmptyStmt where
    Self: Debug
[src]

Unwraps the value, yielding the content of Empty.

Panics

Panics if the value is not Empty, with a panic message including the content of self.

pub fn empty(self) -> Option<EmptyStmt>[src]

Returns Some if self is of variant Empty, and None otherwise.

Trait Implementations

impl Clone for ClassMember[src]

impl Debug for ClassMember[src]

impl<'de> Deserialize<'de> for ClassMember[src]

impl Eq for ClassMember[src]

impl EqIgnoreSpan for ClassMember[src]

impl From<ClassMethod> for ClassMember[src]

impl From<ClassProp> for ClassMember[src]

impl From<Constructor> for ClassMember[src]

impl From<EmptyStmt> for ClassMember[src]

impl From<PrivateMethod> for ClassMember[src]

impl From<PrivateProp> for ClassMember[src]

impl From<TsIndexSignature> for ClassMember[src]

impl Hash for ClassMember[src]

impl PartialEq<ClassMember> for ClassMember[src]

impl Serialize for ClassMember[src]

impl Spanned for ClassMember[src]

impl StructuralEq for ClassMember[src]

impl StructuralPartialEq for ClassMember[src]

Auto Trait Implementations

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

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

impl<T> Sync for T where
    T: ?Sized
[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.