Struct import_map::ImportMap
source · [−]pub struct ImportMap { /* private fields */ }
Implementations
sourceimpl ImportMap
impl ImportMap
pub fn new(base_url: Url) -> Self
pub fn base_url(&self) -> &Url
pub fn resolve(
&self,
specifier: &str,
referrer: &Url
) -> Result<Url, ImportMapError>
pub fn imports(&self) -> &SpecifierMap
pub fn imports_mut(&mut self) -> &mut SpecifierMap
pub fn get_or_append_scope_mut(
&mut self,
key: &str
) -> Result<&mut SpecifierMap, String>
sourcepub fn with_folder_removed(&self, folder: &Url) -> Self
pub fn with_folder_removed(&self, folder: &Url) -> Self
Removes any imports or scopes referencing the provided folder in the import map.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ImportMap
impl Send for ImportMap
impl Sync for ImportMap
impl Unpin for ImportMap
impl UnwindSafe for ImportMap
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more