Enum swc_ecma_ast::TsTypeElement[][src]

pub enum TsTypeElement {
    TsCallSignatureDecl(TsCallSignatureDecl),
    TsConstructSignatureDecl(TsConstructSignatureDecl),
    TsPropertySignature(TsPropertySignature),
    TsGetterSignature(TsGetterSignature),
    TsSetterSignature(TsSetterSignature),
    TsMethodSignature(TsMethodSignature),
    TsIndexSignature(TsIndexSignature),
}

Variants

TsCallSignatureDecl(TsCallSignatureDecl)
TsConstructSignatureDecl(TsConstructSignatureDecl)
TsPropertySignature(TsPropertySignature)
TsGetterSignature(TsGetterSignature)
TsSetterSignature(TsSetterSignature)
TsMethodSignature(TsMethodSignature)
TsIndexSignature(TsIndexSignature)

Implementations

impl TsTypeElement[src]

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

Returns true if self is of variant TsCallSignatureDecl.

pub fn expect_ts_call_signature_decl(self) -> TsCallSignatureDecl where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsCallSignatureDecl.

Panics

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

pub fn ts_call_signature_decl(self) -> Option<TsCallSignatureDecl>[src]

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

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

Returns true if self is of variant TsConstructSignatureDecl.

pub fn expect_ts_construct_signature_decl(self) -> TsConstructSignatureDecl where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsConstructSignatureDecl.

Panics

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

pub fn ts_construct_signature_decl(self) -> Option<TsConstructSignatureDecl>[src]

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

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

Returns true if self is of variant TsPropertySignature.

pub fn expect_ts_property_signature(self) -> TsPropertySignature where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsPropertySignature.

Panics

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

pub fn ts_property_signature(self) -> Option<TsPropertySignature>[src]

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

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

Returns true if self is of variant TsGetterSignature.

pub fn expect_ts_getter_signature(self) -> TsGetterSignature where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsGetterSignature.

Panics

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

pub fn ts_getter_signature(self) -> Option<TsGetterSignature>[src]

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

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

Returns true if self is of variant TsSetterSignature.

pub fn expect_ts_setter_signature(self) -> TsSetterSignature where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsSetterSignature.

Panics

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

pub fn ts_setter_signature(self) -> Option<TsSetterSignature>[src]

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

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

Returns true if self is of variant TsMethodSignature.

pub fn expect_ts_method_signature(self) -> TsMethodSignature where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsMethodSignature.

Panics

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

pub fn ts_method_signature(self) -> Option<TsMethodSignature>[src]

Returns Some if self is of variant TsMethodSignature, 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.

Trait Implementations

impl Clone for TsTypeElement[src]

impl Debug for TsTypeElement[src]

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

impl Eq for TsTypeElement[src]

impl EqIgnoreSpan for TsTypeElement[src]

impl From<TsCallSignatureDecl> for TsTypeElement[src]

impl From<TsConstructSignatureDecl> for TsTypeElement[src]

impl From<TsGetterSignature> for TsTypeElement[src]

impl From<TsIndexSignature> for TsTypeElement[src]

impl From<TsMethodSignature> for TsTypeElement[src]

impl From<TsPropertySignature> for TsTypeElement[src]

impl From<TsSetterSignature> for TsTypeElement[src]

impl Hash for TsTypeElement[src]

impl PartialEq<TsTypeElement> for TsTypeElement[src]

impl Serialize for TsTypeElement[src]

impl Spanned for TsTypeElement[src]

impl StructuralEq for TsTypeElement[src]

impl StructuralPartialEq for TsTypeElement[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.