pub struct SourceMap { /* private fields */ }Implementations§
Source§impl SourceMap
impl SourceMap
pub fn new(source: String, path: PathBuf) -> Self
pub fn from_source(source: String) -> Self
pub fn from_path(path: &Path) -> Result<Self>
pub fn get_path(&self) -> &Path
pub fn get_source(&self) -> &Vec<char>
pub fn get_line(&self, line_number: u32) -> &[char]
pub fn get_line_number(&self, position: usize) -> u32
pub fn get_column_number(&self, position: usize) -> u32
Trait Implementations§
impl StructuralPartialEq for SourceMap
Auto Trait Implementations§
impl Freeze for SourceMap
impl RefUnwindSafe for SourceMap
impl Send for SourceMap
impl Sync for SourceMap
impl Unpin for SourceMap
impl UnsafeUnpin for SourceMap
impl UnwindSafe for SourceMap
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