pub struct DirLoader { /* private fields */ }Expand description
A LibraryLoader that reads libraries from directories on disk.
Implementations§
Source§impl DirLoader
impl DirLoader
pub fn new(roots: Vec<PathBuf>) -> Self
Sourcepub fn source_of(&self, path: &str) -> Option<String>
pub fn source_of(&self, path: &str) -> Option<String>
The source of a library this loader already resolved, if any. Keyed by import path — the same string sema attributes its diagnostics to.
Sourcepub fn resolve_path(&self, path: &str) -> Option<PathBuf>
pub fn resolve_path(&self, path: &str) -> Option<PathBuf>
The on-disk file path resolves to, without reading it — for locating a
library file (e.g. editor go-to-definition).
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for DirLoader
impl !RefUnwindSafe for DirLoader
impl !Sync for DirLoader
impl Send for DirLoader
impl Unpin for DirLoader
impl UnsafeUnpin for DirLoader
impl UnwindSafe for DirLoader
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