Struct symbolic_sourcemapcache::SourceLocation
source · [−]pub struct SourceLocation<'data> { /* private fields */ }Expand description
A resolved Source Location with file, line, column and scope information.
Implementations
sourceimpl<'data> SourceLocation<'data>
impl<'data> SourceLocation<'data>
sourcepub fn name(&self) -> Option<&'data str>
pub fn name(&self) -> Option<&'data str>
The name of this source location as it is defined in the SourceMap.
This can be useful when inferring the name of a scope from the callers call expression.
sourcepub fn line_contents(&self) -> Option<&'data str>
pub fn line_contents(&self) -> Option<&'data str>
The contents of the source line.
sourcepub fn scope(&self) -> ScopeLookupResult<'data>
pub fn scope(&self) -> ScopeLookupResult<'data>
The scope containing this source location.
sourcepub fn file_name(&self) -> Option<&'data str>
pub fn file_name(&self) -> Option<&'data str>
The name of the source file this location belongs to.
sourcepub fn file_source(&self) -> Option<&'data str>
pub fn file_source(&self) -> Option<&'data str>
The source of the file this location belongs to.
Trait Implementations
sourceimpl<'data> Debug for SourceLocation<'data>
impl<'data> Debug for SourceLocation<'data>
sourceimpl<'data> PartialEq<SourceLocation<'data>> for SourceLocation<'data>
impl<'data> PartialEq<SourceLocation<'data>> for SourceLocation<'data>
sourcefn eq(&self, other: &SourceLocation<'data>) -> bool
fn eq(&self, other: &SourceLocation<'data>) -> bool
impl<'data> StructuralPartialEq for SourceLocation<'data>
Auto Trait Implementations
impl<'data> RefUnwindSafe for SourceLocation<'data>
impl<'data> Send for SourceLocation<'data>
impl<'data> Sync for SourceLocation<'data>
impl<'data> Unpin for SourceLocation<'data>
impl<'data> UnwindSafe for SourceLocation<'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