Enum swc_ecma_ast::VarDeclOrExpr [−][src]
Variants
VarDecl(VarDecl)
Implementations
impl VarDeclOrExpr
[src]
pub fn is_var_decl(&self) -> bool
[src]
Returns true
if self
is of variant VarDecl
.
pub fn expect_var_decl(self) -> VarDecl where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of VarDecl
.
Panics
Panics if the value is not VarDecl
, with a panic message including the content of self
.
pub fn var_decl(self) -> Option<VarDecl>
[src]
Returns Some
if self
is of variant VarDecl
, and None
otherwise.
pub fn is_expr(&self) -> bool
[src]
Returns true
if self
is of variant Expr
.
pub fn expect_expr(self) -> Box<Expr> where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Expr
.
Panics
Panics if the value is not Expr
, with a panic message including the content of self
.
pub fn expr(self) -> Option<Box<Expr>>
[src]
Returns Some
if self
is of variant Expr
, and None
otherwise.
Trait Implementations
impl Clone for VarDeclOrExpr
[src]
fn clone(&self) -> VarDeclOrExpr
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for VarDeclOrExpr
[src]
impl<'de> Deserialize<'de> for VarDeclOrExpr
[src]
fn deserialize<D>(Deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Eq for VarDeclOrExpr
[src]
impl EqIgnoreSpan for VarDeclOrExpr
[src]
fn eq_ignore_span(&self, other: &Self) -> bool
[src]
impl From<Box<Expr, Global>> for VarDeclOrExpr
[src]
impl From<VarDecl> for VarDeclOrExpr
[src]
impl Hash for VarDeclOrExpr
[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<VarDeclOrExpr> for VarDeclOrExpr
[src]
fn eq(&self, other: &VarDeclOrExpr) -> bool
[src]
fn ne(&self, other: &VarDeclOrExpr) -> bool
[src]
impl Serialize for VarDeclOrExpr
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl Spanned for VarDeclOrExpr
[src]
impl StructuralEq for VarDeclOrExpr
[src]
impl StructuralPartialEq for VarDeclOrExpr
[src]
Auto Trait Implementations
impl RefUnwindSafe for VarDeclOrExpr
[src]
impl Send for VarDeclOrExpr
[src]
impl Sync for VarDeclOrExpr
[src]
impl Unpin for VarDeclOrExpr
[src]
impl UnwindSafe for VarDeclOrExpr
[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>,