pub struct Module {
pub specifier: String,
pub kind: ModuleKind,
/* private fields */
}
Fields§
§specifier: String
§kind: ModuleKind
Implementations§
source§impl Module
impl Module
sourcepub async fn take_source(&self) -> Option<Arc<[u8]>>
pub async fn take_source(&self) -> Option<Arc<[u8]>>
Take source code of the module. This will remove the source code from memory and
the subsequent calls to take_source()
will return None
.
For V1, this will take the entire module and returns the source code. We don’t need
to preserve module metadata for V1.
sourcepub async fn source_map(&self) -> Option<Arc<[u8]>>
pub async fn source_map(&self) -> Option<Arc<[u8]>>
Get source map of the module.
sourcepub async fn take_source_map(&self) -> Option<Arc<[u8]>>
pub async fn take_source_map(&self) -> Option<Arc<[u8]>>
Take source map of the module. This will remove the source map from memory and
the subsequent calls to take_source_map()
will return None
.
Auto Trait Implementations§
impl RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl UnwindSafe for Module
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