pub enum SourceMapRef {
Ref(String),
LegacyRef(String),
}
Expand description
Represents a reference to a sourcemap
Variants§
Implementations§
source§impl SourceMapRef
impl SourceMapRef
sourcepub fn resolve(&self, minified_url: &str) -> Option<String>
pub fn resolve(&self, minified_url: &str) -> Option<String>
Resolves the reference.
The given minified URL needs to be the URL of the minified file. The result is the fully resolved URL of where the source map can be located.
sourcepub fn resolve_path(&self, minified_path: &Path) -> Option<PathBuf>
pub fn resolve_path(&self, minified_path: &Path) -> Option<PathBuf>
Resolves the reference against a local file path
This is similar to resolve
but operates on file paths.
sourcepub fn get_embedded_sourcemap(&self) -> Result<Option<DecodedMap>>
pub fn get_embedded_sourcemap(&self) -> Result<Option<DecodedMap>>
Load an embedded sourcemap if there is a data URL.
Trait Implementations§
source§impl Debug for SourceMapRef
impl Debug for SourceMapRef
source§impl PartialEq for SourceMapRef
impl PartialEq for SourceMapRef
impl Eq for SourceMapRef
impl StructuralPartialEq for SourceMapRef
Auto Trait Implementations§
impl Freeze for SourceMapRef
impl RefUnwindSafe for SourceMapRef
impl Send for SourceMapRef
impl Sync for SourceMapRef
impl Unpin for SourceMapRef
impl UnwindSafe for SourceMapRef
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