[][src]Enum swc_ecma_ast::TsFnOrConstructorType

pub enum TsFnOrConstructorType {
    TsFnType(TsFnType),
    TsConstructorType(TsConstructorType),
}

Variants

TsFnType(TsFnType)
TsConstructorType(TsConstructorType)

Implementations

impl TsFnOrConstructorType[src]

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

Returns true if self is of variant TsFnType.

pub fn expect_ts_fn_type(self) -> TsFnType where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsFnType.

Panics

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

pub fn ts_fn_type(self) -> Option<TsFnType>[src]

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

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

Returns true if self is of variant TsConstructorType.

pub fn expect_ts_constructor_type(self) -> TsConstructorType where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsConstructorType.

Panics

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

pub fn ts_constructor_type(self) -> Option<TsConstructorType>[src]

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

Trait Implementations

impl Clone for TsFnOrConstructorType[src]

impl Debug for TsFnOrConstructorType[src]

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

impl Eq for TsFnOrConstructorType[src]

impl EqIgnoreSpan for TsFnOrConstructorType[src]

impl From<TsConstructorType> for TsFnOrConstructorType[src]

impl From<TsFnOrConstructorType> for TsType[src]

impl From<TsFnType> for TsFnOrConstructorType[src]

impl Hash for TsFnOrConstructorType[src]

impl PartialEq<TsFnOrConstructorType> for TsFnOrConstructorType[src]

impl Serialize for TsFnOrConstructorType[src]

impl Spanned for TsFnOrConstructorType[src]

impl StructuralEq for TsFnOrConstructorType[src]

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