[−][src]Struct sourcemap::SourceMapSection
Represents a section in a sourcemap index
Methods
impl SourceMapSection
[src]
pub fn new(
offset: (u32, u32),
url: Option<String>,
map: Option<DecodedMap>
) -> SourceMapSection
[src]
offset: (u32, u32),
url: Option<String>,
map: Option<DecodedMap>
) -> 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<&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
Auto Trait Implementations
impl !Send for SourceMapSection
impl !Sync for SourceMapSection
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,