Enum swc_ecma_ast::ObjectPatProp[][src]

pub enum ObjectPatProp {
    KeyValue(KeyValuePatProp),
    Assign(AssignPatProp),
    Rest(RestPat),
}

Variants

KeyValue(KeyValuePatProp)
Rest(RestPat)

Implementations

impl ObjectPatProp[src]

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

Returns true if self is of variant KeyValue.

pub fn expect_key_value(self) -> KeyValuePatProp where
    Self: Debug
[src]

Unwraps the value, yielding the content of KeyValue.

Panics

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

pub fn key_value(self) -> Option<KeyValuePatProp>[src]

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

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

Returns true if self is of variant Assign.

pub fn expect_assign(self) -> AssignPatProp 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<AssignPatProp>[src]

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

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

Returns true if self is of variant Rest.

pub fn expect_rest(self) -> RestPat where
    Self: Debug
[src]

Unwraps the value, yielding the content of Rest.

Panics

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

pub fn rest(self) -> Option<RestPat>[src]

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

Trait Implementations

impl Clone for ObjectPatProp[src]

impl Debug for ObjectPatProp[src]

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

impl Eq for ObjectPatProp[src]

impl EqIgnoreSpan for ObjectPatProp[src]

impl From<AssignPatProp> for ObjectPatProp[src]

impl From<KeyValuePatProp> for ObjectPatProp[src]

impl From<RestPat> for ObjectPatProp[src]

impl Hash for ObjectPatProp[src]

impl PartialEq<ObjectPatProp> for ObjectPatProp[src]

impl Serialize for ObjectPatProp[src]

impl Spanned for ObjectPatProp[src]

impl StructuralEq for ObjectPatProp[src]

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