Struct sourcemap::SourceMapSection
source · [−]pub struct SourceMapSection { /* private fields */ }
Expand description
Represents a section in a sourcemap index
Implementations
sourceimpl SourceMapSection
impl SourceMapSection
sourcepub fn new(
offset: (u32, u32),
url: Option<String>,
map: Option<DecodedMap>
) -> SourceMapSection
pub fn new(
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
sourcepub fn get_offset_line(&self) -> u32
pub fn get_offset_line(&self) -> u32
Returns the offset line
sourcepub fn get_offset_col(&self) -> u32
pub fn get_offset_col(&self) -> u32
Returns the offset column
sourcepub fn get_offset(&self) -> (u32, u32)
pub fn get_offset(&self) -> (u32, u32)
Returns the offset as tuple
sourcepub fn get_sourcemap(&self) -> Option<&DecodedMap>
pub fn get_sourcemap(&self) -> Option<&DecodedMap>
Returns a reference to the embedded sourcemap if available
sourcepub fn get_sourcemap_mut(&mut self) -> Option<&mut DecodedMap>
pub fn get_sourcemap_mut(&mut self) -> Option<&mut DecodedMap>
Returns a reference to the embedded sourcemap if available
sourcepub fn set_sourcemap(&mut self, sm: Option<DecodedMap>)
pub fn set_sourcemap(&mut self, sm: Option<DecodedMap>)
Replaces the embedded sourcemap
Trait Implementations
sourceimpl Clone for SourceMapSection
impl Clone for SourceMapSection
sourcefn clone(&self) -> SourceMapSection
fn clone(&self) -> SourceMapSection
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations
impl !RefUnwindSafe for SourceMapSection
impl !Send for SourceMapSection
impl !Sync for SourceMapSection
impl Unpin for SourceMapSection
impl UnwindSafe for SourceMapSection
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more