[][src]Struct sourcemap::SourceMapSection

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]

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

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

Auto Trait Implementations

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.