Struct sourcemap::SourceMapSection [] [src]

pub struct SourceMapSection {
    // some fields omitted
}

Represents a section in a sourcemap index

Methods

impl SourceMapSection
[src]

fn new(offset: (u32, u32), url: Option<String>, map: Option<SourceMap>) -> SourceMapSection

Create a new sourcemap index section

  • offset: offset as line and column
  • url: optional URL of where the sourcemap is located
  • map: an optional already resolved internal sourcemap

fn get_offset_line(&self) -> u32

Returns the offset line

fn get_offset_col(&self) -> u32

Returns the offset column

fn get_offset(&self) -> (u32, u32)

Returns the offset as tuple

fn get_url(&self) -> Option<&str>

Returns the URL of the referenced map if available

fn get_sourcemap(&self) -> Option<&SourceMap>

Returns a reference to the embedded sourcemap if available

fn set_sourcemap(&mut self, sm: SourceMap)

Replaces the embedded sourcemap