Struct codespan::CodeMap
[−]
[src]
pub struct CodeMap { /* fields omitted */ }
Methods
impl CodeMap
[src]
pub fn new() -> CodeMap
[src]
Creates an empty CodeMap
.
pub fn add_filemap(&mut self, name: FileName, src: String) -> Arc<FileMap>
[src]
Adds a filemap to the codemap with the given name and source string
pub fn add_filemap_from_disk<P: Into<PathBuf>>(
&mut self,
name: P
) -> Result<Arc<FileMap>>
[src]
&mut self,
name: P
) -> Result<Arc<FileMap>>
Adds a filemap to the codemap with the given name and source string
pub fn find_file(&self, index: ByteIndex) -> Option<&Arc<FileMap>>
[src]
Looks up the File
that contains the specified byte index.
Trait Implementations
impl Clone for CodeMap
[src]
fn clone(&self) -> CodeMap
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for CodeMap
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more