[][src]Struct sourcemap::SourceMapSection

pub struct SourceMapSection { /* fields omitted */ }

Represents a section in a sourcemap index

Implementations

impl SourceMapSection[src]

pub fn new(
    offset: (u32, u32),
    url: Option<String>,
    map: Option<DecodedMap>
) -> 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<&DecodedMap>[src]

Returns a reference to the embedded sourcemap if available

pub fn get_sourcemap_mut(&mut self) -> Option<&mut DecodedMap>[src]

Returns a reference to the embedded sourcemap if available

pub fn set_sourcemap(&mut self, sm: Option<DecodedMap>)[src]

Replaces the embedded sourcemap

Trait Implementations

impl Clone for SourceMapSection[src]

impl Debug for SourceMapSection[src]

Auto Trait Implementations

impl !RefUnwindSafe for SourceMapSection

impl !Send for SourceMapSection

impl !Sync for SourceMapSection

impl Unpin for SourceMapSection

impl UnwindSafe for SourceMapSection

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.