Enum boa::syntax::ast::node::declaration::Declaration
source · [−]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
Identifier
Pattern(DeclarationPattern)
Trait Implementations
sourceimpl Clone for Declaration
impl Clone for Declaration
sourcefn clone(&self) -> Declaration
fn clone(&self) -> Declaration
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for Declaration
impl Debug for Declaration
sourceimpl Display for Declaration
impl Display for Declaration
sourceimpl Drop for Declaration
impl Drop for Declaration
sourceimpl Finalize for Declaration
impl Finalize for Declaration
sourceimpl From<Declaration> for Box<[Declaration]>
impl From<Declaration> for Box<[Declaration]>
sourcefn from(d: Declaration) -> Self
fn from(d: Declaration) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<Declaration> for Declaration
impl PartialEq<Declaration> for Declaration
sourcefn eq(&self, other: &Declaration) -> bool
fn eq(&self, other: &Declaration) -> bool
sourceimpl Trace for Declaration
impl Trace for Declaration
sourcefn finalize_glue(&self)
fn finalize_glue(&self)
Runs Finalize::finalize() on this object and all
contained subobjects Read more
impl StructuralPartialEq for Declaration
Auto Trait Implementations
impl RefUnwindSafe for Declaration
impl !Send for Declaration
impl !Sync for Declaration
impl Unpin for Declaration
impl UnwindSafe for Declaration
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more