[−][src]Enum swc_ecma_ast::ClassMember
Variants
Constructor(Constructor)
Method(ClassMethod)
es2015
PrivateMethod(PrivateMethod)
ClassProp(ClassProp)
stage 0 / Typescript
PrivateProp(PrivateProp)
TsIndexSignature(TsIndexSignature)
Empty(EmptyStmt)
Implementations
impl ClassMember
[src]
pub fn is_constructor(&self) -> bool
[src]
Returns true
if self
is of variant Constructor
.
pub fn expect_constructor(self) -> Constructor where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Constructor
.
Panics
Panics if the value is not Constructor
, with a panic message including the content of self
.
pub fn constructor(self) -> Option<Constructor>
[src]
Returns Some
if self
is of variant Constructor
, and None
otherwise.
pub fn is_method(&self) -> bool
[src]
Returns true
if self
is of variant Method
.
pub fn expect_method(self) -> ClassMethod where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Method
.
Panics
Panics if the value is not Method
, with a panic message including the content of self
.
pub fn method(self) -> Option<ClassMethod>
[src]
Returns Some
if self
is of variant Method
, and None
otherwise.
pub fn is_private_method(&self) -> bool
[src]
Returns true
if self
is of variant PrivateMethod
.
pub fn expect_private_method(self) -> PrivateMethod where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of PrivateMethod
.
Panics
Panics if the value is not PrivateMethod
, with a panic message including the content of self
.
pub fn private_method(self) -> Option<PrivateMethod>
[src]
Returns Some
if self
is of variant PrivateMethod
, and None
otherwise.
pub fn is_class_prop(&self) -> bool
[src]
Returns true
if self
is of variant ClassProp
.
pub fn expect_class_prop(self) -> ClassProp where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of ClassProp
.
Panics
Panics if the value is not ClassProp
, with a panic message including the content of self
.
pub fn class_prop(self) -> Option<ClassProp>
[src]
Returns Some
if self
is of variant ClassProp
, and None
otherwise.
pub fn is_private_prop(&self) -> bool
[src]
Returns true
if self
is of variant PrivateProp
.
pub fn expect_private_prop(self) -> PrivateProp where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of PrivateProp
.
Panics
Panics if the value is not PrivateProp
, with a panic message including the content of self
.
pub fn private_prop(self) -> Option<PrivateProp>
[src]
Returns Some
if self
is of variant PrivateProp
, 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]
Self: Debug,
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.
pub fn is_empty(&self) -> bool
[src]
Returns true
if self
is of variant Empty
.
pub fn expect_empty(self) -> EmptyStmt where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Empty
.
Panics
Panics if the value is not Empty
, with a panic message including the content of self
.
pub fn empty(self) -> Option<EmptyStmt>
[src]
Returns Some
if self
is of variant Empty
, and None
otherwise.
Trait Implementations
impl Clone for ClassMember
[src]
fn clone(&self) -> ClassMember
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ClassMember
[src]
impl<'de> Deserialize<'de> for ClassMember
[src]
fn deserialize<D>(Deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Eq for ClassMember
[src]
impl EqIgnoreSpan for ClassMember
[src]
fn eq_ignore_span(&self, other: &Self) -> bool
[src]
impl From<ClassMethod> for ClassMember
[src]
fn from(v: ClassMethod) -> Self
[src]
impl From<ClassProp> for ClassMember
[src]
impl From<Constructor> for ClassMember
[src]
fn from(v: Constructor) -> Self
[src]
impl From<EmptyStmt> for ClassMember
[src]
impl From<PrivateMethod> for ClassMember
[src]
fn from(v: PrivateMethod) -> Self
[src]
impl From<PrivateProp> for ClassMember
[src]
fn from(v: PrivateProp) -> Self
[src]
impl From<TsIndexSignature> for ClassMember
[src]
fn from(v: TsIndexSignature) -> Self
[src]
impl Hash for ClassMember
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<ClassMember> for ClassMember
[src]
fn eq(&self, other: &ClassMember) -> bool
[src]
fn ne(&self, other: &ClassMember) -> bool
[src]
impl Serialize for ClassMember
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl Spanned for ClassMember
[src]
impl StructuralEq for ClassMember
[src]
impl StructuralPartialEq for ClassMember
[src]
Auto Trait Implementations
impl RefUnwindSafe for ClassMember
[src]
impl Send for ClassMember
[src]
impl Sync for ClassMember
[src]
impl Unpin for ClassMember
[src]
impl UnwindSafe for ClassMember
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Send for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,