pub enum Declaration {
Identifier {
ident: Identifier,
init: Option<Node>,
},
Pattern(DeclarationPattern),
}Expand description
Declaration represents either an individual binding or a binding pattern.
For let and const declarations this type represents a LexicalBinding
For var declarations this type represents a VariableDeclaration
More information:
Variants§
Trait Implementations§
Source§impl Clone for Declaration
impl Clone for Declaration
Source§fn clone(&self) -> Declaration
fn clone(&self) -> Declaration
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Declaration
impl Debug for Declaration
Source§impl Display for Declaration
impl Display for Declaration
Source§impl Drop for Declaration
impl Drop for Declaration
Source§impl From<Declaration> for Box<[Declaration]>
impl From<Declaration> for Box<[Declaration]>
Source§fn from(d: Declaration) -> Self
fn from(d: Declaration) -> Self
Converts to this type from the input type.
Source§impl PartialEq for Declaration
impl PartialEq for Declaration
Source§impl Trace for Declaration
impl Trace for Declaration
Source§fn finalize_glue(&self)
fn finalize_glue(&self)
Runs Finalize::finalize() on this object and all
contained subobjects
impl StructuralPartialEq for Declaration
Auto Trait Implementations§
impl Freeze for Declaration
impl RefUnwindSafe for Declaration
impl !Send for Declaration
impl !Sync for Declaration
impl Unpin for Declaration
impl UnwindSafe for Declaration
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more