Struct sourcemap::SourceMapSection
[−]
[src]
pub struct SourceMapSection { /* fields omitted */ }
Represents a section in a sourcemap index
Methods
impl SourceMapSection
[src]
pub fn new(
offset: (u32, u32),
url: Option<String>,
map: Option<SourceMap>
) -> SourceMapSection
[src]
offset: (u32, u32),
url: Option<String>,
map: Option<SourceMap>
) -> SourceMapSection
Create a new sourcemap index section
offset
: offset as line and columnurl
: optional URL of where the sourcemap is locatedmap
: an optional already resolved internal sourcemap
pub fn get_offset_line(&self) -> u32
[src]
Returns the offset line
pub fn get_offset_col(&self) -> u32
[src]
Returns the offset column
pub fn get_offset(&self) -> (u32, u32)
[src]
Returns the offset as tuple
pub fn get_url(&self) -> Option<&str>
[src]
Returns the URL of the referenced map if available
pub fn set_url(&mut self, value: Option<&str>)
[src]
Updates the URL for this section.
pub fn get_sourcemap(&self) -> Option<&SourceMap>
[src]
Returns a reference to the embedded sourcemap if available
pub fn get_sourcemap_mut(&mut self) -> Option<&mut SourceMap>
[src]
Returns a reference to the embedded sourcemap if available
pub fn set_sourcemap(&mut self, sm: Option<SourceMap>)
[src]
Replaces the embedded sourcemap