[][src]Enum sourcemap::SourceMapRef

pub enum SourceMapRef {
    Ref(String),
    LegacyRef(String),
}

Represents a reference to a sourcemap

Variants

Ref(String)

A regular URL reference

LegacyRef(String)

A legacy URL reference

Implementations

impl SourceMapRef[src]

pub fn get_url(&self) -> &str[src]

Return the URL of the reference

pub fn resolve(&self, minified_url: &str) -> Option<String>[src]

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.

pub fn resolve_path(&self, minified_path: &Path) -> Option<PathBuf>[src]

Resolves the reference against a local file path

This is similar to resolve but operates on file paths.

pub fn get_embedded_sourcemap(&self) -> Result<Option<DecodedMap>>[src]

Load an embedded sourcemap if there is a data URL.

Trait Implementations

impl Debug for SourceMapRef[src]

impl PartialEq<SourceMapRef> for SourceMapRef[src]

impl StructuralPartialEq for SourceMapRef[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.