Enum sourcemap::SourceMapRef
source · [−]Expand description
Represents a reference to a sourcemap
Variants
Ref(String)
A regular URL reference
LegacyRef(String)
A legacy URL reference
Implementations
sourceimpl 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
sourceimpl Debug for SourceMapRef
impl Debug for SourceMapRef
sourceimpl PartialEq<SourceMapRef> for SourceMapRef
impl PartialEq<SourceMapRef> for SourceMapRef
sourcefn eq(&self, other: &SourceMapRef) -> bool
fn eq(&self, other: &SourceMapRef) -> bool
impl Eq for SourceMapRef
impl StructuralEq for SourceMapRef
impl StructuralPartialEq for SourceMapRef
Auto Trait Implementations
impl RefUnwindSafe for SourceMapRef
impl Send for SourceMapRef
impl Sync for SourceMapRef
impl Unpin for SourceMapRef
impl UnwindSafe for SourceMapRef
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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