pub struct FileDb { /* private fields */ }Expand description
Database of source files, keyed by FileId.
Implementations§
Source§impl FileDb
impl FileDb
pub fn new() -> Self
Sourcepub fn add(
&mut self,
name: impl Into<String>,
source: impl Into<String>,
) -> FileId
pub fn add( &mut self, name: impl Into<String>, source: impl Into<String>, ) -> FileId
Add a file and return its FileId.
pub fn get_source(&self, id: FileId) -> Option<&str>
pub fn get_name(&self, id: FileId) -> Option<&str>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileDb
impl RefUnwindSafe for FileDb
impl Send for FileDb
impl Sync for FileDb
impl Unpin for FileDb
impl UnsafeUnpin for FileDb
impl UnwindSafe for FileDb
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