pub struct ImportDeclaration { /* private fields */ }Expand description
Implementations§
Source§impl ImportDeclaration
impl ImportDeclaration
Sourcepub fn new(
default: Option<Identifier>,
kind: ImportKind,
specifier: ModuleSpecifier,
attributes: Box<[ImportAttribute]>,
) -> Self
pub fn new( default: Option<Identifier>, kind: ImportKind, specifier: ModuleSpecifier, attributes: Box<[ImportAttribute]>, ) -> Self
Creates a new import declaration.
Sourcepub const fn default(&self) -> Option<Identifier>
pub const fn default(&self) -> Option<Identifier>
Gets the binding for the default export of the module.
Sourcepub const fn specifier(&self) -> ModuleSpecifier
pub const fn specifier(&self) -> ModuleSpecifier
Gets the module specifier of the import declaration.
Sourcepub const fn kind(&self) -> &ImportKind
pub const fn kind(&self) -> &ImportKind
Gets the import kind of the import declaration.
Sourcepub const fn attributes(&self) -> &[ImportAttribute]
pub const fn attributes(&self) -> &[ImportAttribute]
Gets the import attributes of the import declaration.
Trait Implementations§
Source§impl Clone for ImportDeclaration
impl Clone for ImportDeclaration
Source§fn clone(&self) -> ImportDeclaration
fn clone(&self) -> ImportDeclaration
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 ImportDeclaration
impl Debug for ImportDeclaration
Source§impl<'de> Deserialize<'de> for ImportDeclaration
impl<'de> Deserialize<'de> for ImportDeclaration
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
impl Eq for ImportDeclaration
Source§impl<'a> From<&'a ImportDeclaration> for NodeRef<'a>
impl<'a> From<&'a ImportDeclaration> for NodeRef<'a>
Source§fn from(node: &'a ImportDeclaration) -> NodeRef<'a>
fn from(node: &'a ImportDeclaration) -> NodeRef<'a>
Converts to this type from the input type.
Source§impl<'a> From<&'a mut ImportDeclaration> for NodeRefMut<'a>
impl<'a> From<&'a mut ImportDeclaration> for NodeRefMut<'a>
Source§fn from(node: &'a mut ImportDeclaration) -> NodeRefMut<'a>
fn from(node: &'a mut ImportDeclaration) -> NodeRefMut<'a>
Converts to this type from the input type.
Source§impl PartialEq for ImportDeclaration
impl PartialEq for ImportDeclaration
Source§impl Serialize for ImportDeclaration
impl Serialize for ImportDeclaration
impl StructuralPartialEq for ImportDeclaration
Source§impl VisitWith for ImportDeclaration
impl VisitWith for ImportDeclaration
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 Freeze for ImportDeclaration
impl RefUnwindSafe for ImportDeclaration
impl Send for ImportDeclaration
impl Sync for ImportDeclaration
impl Unpin for ImportDeclaration
impl UnsafeUnpin for ImportDeclaration
impl UnwindSafe for ImportDeclaration
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.