pub struct SourceMap {
pub sources: Vec<Source>,
}
Fieldsยง
ยงsources: Vec<Source>
Implementationsยง
Sourceยงimpl SourceMap
impl SourceMap
pub fn new(sources: Vec<Source>) -> SourceMap
pub fn add(&mut self, source: Source)
Sourcepub fn get(&self, index: usize) -> Result<&Source, Error>
pub fn get(&self, index: usize) -> Result<&Source, Error>
Get a source by its index.
If the source is not found, Error::SourceNotFound
is returned.
Trait Implementationsยง
Auto Trait Implementationsยง
impl Freeze for SourceMap
impl RefUnwindSafe for SourceMap
impl Send for SourceMap
impl Sync for SourceMap
impl Unpin 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