Struct symbolic_sourcemap::SourceMapView[][src]

pub struct SourceMapView { /* fields omitted */ }

Represents a source map.

Implementations

impl SourceMapView[src]

pub fn from_json_slice(buffer: &[u8]) -> Result<Self, ParseSourceMapError>[src]

Constructs a sourcemap from a slice.

If the sourcemap is an index it is being flattened. If flattening is not possible then an error is raised.

pub fn lookup_token(&self, line: u32, col: u32) -> Option<TokenMatch<'_>>[src]

Looks up a token and returns it.

pub fn get_token(&self, idx: u32) -> Option<TokenMatch<'_>>[src]

Returns a token for a specific index.

pub fn get_token_count(&self) -> u32[src]

Returns the number of tokens.

pub fn get_source_view(&self, idx: u32) -> Option<&SourceView<'_>>[src]

Returns a source view for the given source.

pub fn get_source_name(&self, idx: u32) -> Option<&str>[src]

Returns the source name for an index.

pub fn get_source_count(&self) -> u32[src]

Returns the number of sources.

pub fn lookup_token_with_function_name<'a, 'b>(
    &'a self,
    line: u32,
    col: u32,
    minified_name: &str,
    source: &SourceView<'b>
) -> Option<TokenMatch<'a>>
[src]

Looks up a token and the original function name.

This is similar to lookup_token but if a minified function name and the sourceview to the minified source is available this function will also resolve the original function name. This is used to fully resolve tracebacks.

Auto Trait Implementations

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.