pub enum DecodedMap {
    Regular(SourceMap),
    Index(SourceMapIndex),
    Hermes(SourceMapHermes),
}
Expand description

Represents the result of a decode operation

This represents either an actual sourcemap or a source map index. Usually the two things are too distinct to provide a common interface however for token lookup and writing back into a writer general methods are provided.

Variants§

§

Regular(SourceMap)

Indicates a regular sourcemap

§

Index(SourceMapIndex)

Indicates a sourcemap index

§

Hermes(SourceMapHermes)

Indicates a sourcemap as generated by Metro+Hermes, as used by react-native

Implementations§

Alias for decode.

Writes a decoded sourcemap to a writer.

Shortcut to look up a token on either an index or a regular sourcemap. This method can only be used if the contained index actually contains embedded maps or it will not be able to look up anything.

Returns the original function name.

minified_name and source_view are not always necessary. For instance hermes source maps can provide this information without access to the original sources.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.