pub enum ModuleItem {
ImportDeclaration(ImportDeclaration),
ExportDeclaration(Box<ExportDeclaration>),
StatementListItem(StatementListItem),
}Expand description
Module item AST node.
This is an extension over a StatementList, which can also include
multiple ImportDeclaration and ExportDeclaration nodes, along with
StatementListItem nodes.
More information:
Variants§
ImportDeclaration(ImportDeclaration)
See ImportDeclaration.
ExportDeclaration(Box<ExportDeclaration>)
See ExportDeclaration.
StatementListItem(StatementListItem)
See StatementListItem.
Trait Implementations§
Source§impl Clone for ModuleItem
impl Clone for ModuleItem
Source§fn clone(&self) -> ModuleItem
fn clone(&self) -> ModuleItem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ModuleItem
impl Debug for ModuleItem
Source§impl<'de> Deserialize<'de> for ModuleItem
impl<'de> Deserialize<'de> for ModuleItem
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> From<&'a ModuleItem> for NodeRef<'a>
impl<'a> From<&'a ModuleItem> for NodeRef<'a>
Source§fn from(node: &'a ModuleItem) -> NodeRef<'a>
fn from(node: &'a ModuleItem) -> NodeRef<'a>
Converts to this type from the input type.
Source§impl<'a> From<&'a mut ModuleItem> for NodeRefMut<'a>
impl<'a> From<&'a mut ModuleItem> for NodeRefMut<'a>
Source§fn from(node: &'a mut ModuleItem) -> NodeRefMut<'a>
fn from(node: &'a mut ModuleItem) -> NodeRefMut<'a>
Converts to this type from the input type.
Source§impl PartialEq for ModuleItem
impl PartialEq for ModuleItem
Source§impl Serialize for ModuleItem
impl Serialize for ModuleItem
impl StructuralPartialEq for ModuleItem
Source§impl VisitWith for ModuleItem
impl VisitWith for ModuleItem
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.
Auto Trait Implementations§
impl !RefUnwindSafe for ModuleItem
impl !Send for ModuleItem
impl !Sync for ModuleItem
impl !UnwindSafe for ModuleItem
impl Freeze for ModuleItem
impl Unpin for ModuleItem
impl UnsafeUnpin for ModuleItem
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