pub struct BasicSourceMap { /* private fields */ }Expand description
Basic implementation of SourceMap.
Implementations§
Source§impl BasicSourceMap
impl BasicSourceMap
pub fn new() -> Self
pub fn add_item(&mut self, decl: String, entry: SourceMapEntry)
pub fn file(&self, path: &ModulePath) -> Option<&SourceMapFile>
pub fn add_file(&mut self, path: ModulePath, file: SourceMapFile)
pub fn set_default_source(&mut self, source: String)
Trait Implementations§
Source§impl Clone for BasicSourceMap
impl Clone for BasicSourceMap
Source§fn clone(&self) -> BasicSourceMap
fn clone(&self) -> BasicSourceMap
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BasicSourceMap
impl Debug for BasicSourceMap
Source§impl Default for BasicSourceMap
impl Default for BasicSourceMap
Source§fn default() -> BasicSourceMap
fn default() -> BasicSourceMap
Returns the “default value” for a type. Read more
Source§impl SourceMap for BasicSourceMap
impl SourceMap for BasicSourceMap
Source§fn item(&self, decl: &str) -> Option<&SourceMapEntry>
fn item(&self, decl: &str) -> Option<&SourceMapEntry>
Get the module path and declaration name from a mangled name.
Source§fn display_name(&self, path: &ModulePath) -> Option<&str>
fn display_name(&self, path: &ModulePath) -> Option<&str>
Get a module display name.
Source§fn default_source(&self) -> Option<&str>
fn default_source(&self) -> Option<&str>
Get the default module contents.
Auto Trait Implementations§
impl Freeze for BasicSourceMap
impl RefUnwindSafe for BasicSourceMap
impl Send for BasicSourceMap
impl Sync for BasicSourceMap
impl Unpin for BasicSourceMap
impl UnsafeUnpin for BasicSourceMap
impl UnwindSafe for BasicSourceMap
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more