pub struct BasicSourceMap { /* private fields */ }
Expand description
Basic implementation of SourceMap
.
Implementations§
Source§impl BasicSourceMap
impl BasicSourceMap
pub fn new() -> Self
pub fn add_decl(&mut self, decl: String, path: ModulePath, item: String)
pub fn add_source( &mut self, file: ModulePath, name: Option<String>, source: String, )
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 · 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 get_decl(&self, decl: &str) -> Option<(&ModulePath, &str)>
fn get_decl(&self, decl: &str) -> Option<(&ModulePath, &str)>
Get the module path and declaration name from a mangled name.
Source§fn get_source(&self, path: &ModulePath) -> Option<&str>
fn get_source(&self, path: &ModulePath) -> Option<&str>
Get a module contents.
Source§fn get_display_name(&self, path: &ModulePath) -> Option<&str>
fn get_display_name(&self, path: &ModulePath) -> Option<&str>
Get a module display name.
Source§fn get_default_source(&self) -> Option<&str>
fn get_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 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
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