Struct symbolic_sourcemapcache::SourceMapCache
source · [−]pub struct SourceMapCache<'data> { /* private fields */ }Expand description
A cached SourceMap lookup index.
This allows quick lookup inside SourceMaps via the lookup method.
Implementations
sourceimpl<'data> SourceMapCache<'data>
impl<'data> SourceMapCache<'data>
sourcepub fn parse(buf: &'data [u8]) -> Result<Self, Error>
pub fn parse(buf: &'data [u8]) -> Result<Self, Error>
Parses a raw buffer containing a serialized SourceMapCache.
sourcepub fn lookup(&self, sp: SourcePosition) -> Option<SourceLocation<'_>>
pub fn lookup(&self, sp: SourcePosition) -> Option<SourceLocation<'_>>
Looks up a SourcePosition in the minified source and resolves it
to the original SourceLocation.
Trait Implementations
sourceimpl<'data> Clone for SourceMapCache<'data>
impl<'data> Clone for SourceMapCache<'data>
sourcefn clone(&self) -> SourceMapCache<'data>
fn clone(&self) -> SourceMapCache<'data>
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<'data> RefUnwindSafe for SourceMapCache<'data>
impl<'data> Send for SourceMapCache<'data>
impl<'data> Sync for SourceMapCache<'data>
impl<'data> Unpin for SourceMapCache<'data>
impl<'data> UnwindSafe for SourceMapCache<'data>
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