[−][src]Struct symbolic_sourcemap::SourceMapView
Represents a source map.
Methods
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]
&'a self,
line: u32,
col: u32,
minified_name: &str,
source: &SourceView<'b>
) -> Option<TokenMatch<'a>>
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
impl !Send for SourceMapView
impl !Sync for SourceMapView
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,