Enum boa_ast::declaration::Declaration
source · pub enum Declaration {
Function(Function),
Generator(Generator),
AsyncFunction(AsyncFunction),
AsyncGenerator(AsyncGenerator),
Class(Class),
Lexical(LexicalDeclaration),
}
Expand description
The Declaration
Parse Node.
See the module level documentation for more information.
Variants§
Function(Function)
See Function
Generator(Generator)
See Generator
AsyncFunction(AsyncFunction)
See AsyncFunction
AsyncGenerator(AsyncGenerator)
See AsyncGenerator
Class(Class)
See Class
Lexical(LexicalDeclaration)
Trait Implementations§
source§impl Clone for Declaration
impl Clone for Declaration
source§fn clone(&self) -> Declaration
fn clone(&self) -> Declaration
Returns a copy 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<'ast> From<&'ast Declaration> for LexicallyScopedDeclaration<'ast>
impl<'ast> From<&'ast Declaration> for LexicallyScopedDeclaration<'ast>
source§fn from(value: &'ast Declaration) -> LexicallyScopedDeclaration<'ast>
fn from(value: &'ast Declaration) -> LexicallyScopedDeclaration<'ast>
Converts to this type from the input type.
source§impl<'a> From<&'a Declaration> for NodeRef<'a>
impl<'a> From<&'a Declaration> for NodeRef<'a>
source§fn from(node: &'a Declaration) -> NodeRef<'a>
fn from(node: &'a Declaration) -> NodeRef<'a>
Converts to this type from the input type.
source§impl<'a> From<&'a mut Declaration> for NodeRefMut<'a>
impl<'a> From<&'a mut Declaration> for NodeRefMut<'a>
source§fn from(node: &'a mut Declaration) -> NodeRefMut<'a>
fn from(node: &'a mut Declaration) -> NodeRefMut<'a>
Converts to this type from the input type.
source§impl From<AsyncFunction> for Declaration
impl From<AsyncFunction> for Declaration
source§fn from(f: AsyncFunction) -> Self
fn from(f: AsyncFunction) -> Self
Converts to this type from the input type.
source§impl From<AsyncGenerator> for Declaration
impl From<AsyncGenerator> for Declaration
source§fn from(f: AsyncGenerator) -> Self
fn from(f: AsyncGenerator) -> Self
Converts to this type from the input type.
source§impl From<Class> for Declaration
impl From<Class> for Declaration
source§impl From<Declaration> for StatementListItem
impl From<Declaration> for StatementListItem
source§fn from(decl: Declaration) -> Self
fn from(decl: Declaration) -> Self
Converts to this type from the input type.
source§impl From<Function> for Declaration
impl From<Function> for Declaration
source§impl From<Generator> for Declaration
impl From<Generator> for Declaration
source§impl From<LexicalDeclaration> for Declaration
impl From<LexicalDeclaration> for Declaration
source§fn from(lex: LexicalDeclaration) -> Self
fn from(lex: LexicalDeclaration) -> Self
Converts to this type from the input type.
source§impl PartialEq for Declaration
impl PartialEq for Declaration
source§fn eq(&self, other: &Declaration) -> bool
fn eq(&self, other: &Declaration) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl ToIndentedString for Declaration
impl ToIndentedString for Declaration
source§impl VisitWith for Declaration
impl VisitWith for Declaration
source§fn visit_with<'a, V>(&'a self, visitor: &mut V) -> ControlFlow<V::BreakTy>where
V: Visitor<'a>,
fn visit_with<'a, V>(&'a self, visitor: &mut V) -> ControlFlow<V::BreakTy>where
V: Visitor<'a>,
Visit this node with the provided visitor.
source§fn visit_with_mut<'a, V>(
&'a mut self,
visitor: &mut V
) -> ControlFlow<V::BreakTy>where
V: VisitorMut<'a>,
fn visit_with_mut<'a, V>(
&'a mut self,
visitor: &mut V
) -> ControlFlow<V::BreakTy>where
V: VisitorMut<'a>,
Visit this node with the provided visitor mutably, allowing the visitor to modify private
fields.
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§
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
source§impl<T> ToInternedString for Twhere
T: ToIndentedString,
impl<T> ToInternedString for Twhere
T: ToIndentedString,
source§fn to_interned_string(&self, interner: &Interner) -> String
fn to_interned_string(&self, interner: &Interner) -> String
Converts a given element to a string using an interner.