Enum swc_ecma_ast::TsParamPropParam[][src]

pub enum TsParamPropParam {
    Ident(BindingIdent),
    Assign(AssignPat),
}

Variants

Assign(AssignPat)

Implementations

impl TsParamPropParam[src]

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

Returns true if self is of variant Ident.

pub fn expect_ident(self) -> BindingIdent where
    Self: Debug
[src]

Unwraps the value, yielding the content of Ident.

Panics

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

pub fn ident(self) -> Option<BindingIdent>[src]

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

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

Returns true if self is of variant Assign.

pub fn expect_assign(self) -> AssignPat where
    Self: Debug
[src]

Unwraps the value, yielding the content of Assign.

Panics

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

pub fn assign(self) -> Option<AssignPat>[src]

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

Trait Implementations

impl Clone for TsParamPropParam[src]

impl Debug for TsParamPropParam[src]

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

impl Eq for TsParamPropParam[src]

impl EqIgnoreSpan for TsParamPropParam[src]

impl From<AssignPat> for TsParamPropParam[src]

impl From<BindingIdent> for TsParamPropParam[src]

impl Hash for TsParamPropParam[src]

impl PartialEq<TsParamPropParam> for TsParamPropParam[src]

impl Serialize for TsParamPropParam[src]

impl Spanned for TsParamPropParam[src]

impl StructuralEq for TsParamPropParam[src]

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