pub struct JsImportStatementParts { /* private fields */ }Expand description
Lightweight import statement metadata.
Implementations§
Source§impl JsImportStatementParts
impl JsImportStatementParts
Sourcepub const fn new(kind: JsImportKind, source: JsModuleSpecifier) -> Self
pub const fn new(kind: JsImportKind, source: JsModuleSpecifier) -> Self
Creates import statement metadata.
Sourcepub fn with_specifier(self, specifier: JsImportSpecifier) -> Self
pub fn with_specifier(self, specifier: JsImportSpecifier) -> Self
Adds a specifier and returns the updated metadata.
Sourcepub const fn kind(&self) -> JsImportKind
pub const fn kind(&self) -> JsImportKind
Returns the import kind.
Sourcepub const fn source(&self) -> &JsModuleSpecifier
pub const fn source(&self) -> &JsModuleSpecifier
Returns the import source specifier.
Sourcepub fn specifiers(&self) -> &[JsImportSpecifier]
pub fn specifiers(&self) -> &[JsImportSpecifier]
Returns imported binding metadata.
Trait Implementations§
Source§impl Clone for JsImportStatementParts
impl Clone for JsImportStatementParts
Source§fn clone(&self) -> JsImportStatementParts
fn clone(&self) -> JsImportStatementParts
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 JsImportStatementParts
impl Debug for JsImportStatementParts
Source§impl PartialEq for JsImportStatementParts
impl PartialEq for JsImportStatementParts
Source§fn eq(&self, other: &JsImportStatementParts) -> bool
fn eq(&self, other: &JsImportStatementParts) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for JsImportStatementParts
impl StructuralPartialEq for JsImportStatementParts
Auto Trait Implementations§
impl Freeze for JsImportStatementParts
impl RefUnwindSafe for JsImportStatementParts
impl Send for JsImportStatementParts
impl Sync for JsImportStatementParts
impl Unpin for JsImportStatementParts
impl UnsafeUnpin for JsImportStatementParts
impl UnwindSafe for JsImportStatementParts
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