Enum swc_ecma_ast::ParamOrTsParamProp[][src]

pub enum ParamOrTsParamProp {
    TsParamProp(TsParamProp),
    Param(Param),
}

Variants

TsParamProp(TsParamProp)
Param(Param)

Implementations

impl ParamOrTsParamProp[src]

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

Returns true if self is of variant TsParamProp.

pub fn expect_ts_param_prop(self) -> TsParamProp where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsParamProp.

Panics

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

pub fn ts_param_prop(self) -> Option<TsParamProp>[src]

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

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

Returns true if self is of variant Param.

pub fn expect_param(self) -> Param where
    Self: Debug
[src]

Unwraps the value, yielding the content of Param.

Panics

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

pub fn param(self) -> Option<Param>[src]

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

Trait Implementations

impl Clone for ParamOrTsParamProp[src]

impl Debug for ParamOrTsParamProp[src]

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

impl Eq for ParamOrTsParamProp[src]

impl EqIgnoreSpan for ParamOrTsParamProp[src]

impl From<Param> for ParamOrTsParamProp[src]

impl From<TsParamProp> for ParamOrTsParamProp[src]

impl Hash for ParamOrTsParamProp[src]

impl PartialEq<ParamOrTsParamProp> for ParamOrTsParamProp[src]

impl Serialize for ParamOrTsParamProp[src]

impl Spanned for ParamOrTsParamProp[src]

impl StructuralEq for ParamOrTsParamProp[src]

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