Struct sourcemap::SourceView

source ·
pub struct SourceView<'a> { /* private fields */ }
Expand description

Provides efficient access to minified sources.

This type is used to implement fairly efficient source mapping operations.

Implementations§

Creates an optimized view of a given source.

Creates an optimized view from a given source string

Returns a requested minified line.

Returns a line slice.

Note that columns are indexed as JavaScript WTF-16 columns.

Returns an iterator over all lines.

Returns the source.

Given a token and minified function name this attemps to resolve the name to an original function name.

This invokes some guesswork and requires access to the original minified source. This will not yield proper results for anonymous functions or functions that do not have clear function names. (For instance it’s recommended that dotted function names are not passed to this function).

Returns the number of lines.

Returns the source map reference in the source view.

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.