pub struct FilesystemLoader {
pub base_dir: PathBuf,
pub extra_search_paths: Vec<PathBuf>,
}Expand description
Filesystem-backed loader. Reads a module path string by walking a base directory (or filesystem-absolute paths). Path-resolution rules match the documented design:
pathending in.tlispor.lispis read as-is.pathwithout an extension tries<path>.tlisp, then<path>.lisp, then<path>/init.tlisp, then<path>/init.lisp.- Relative paths resolve against
base_dir. Absolute paths are passed through. The optionalextra_search_pathslist (e.g. a$TATARA_PATH-equivalent) is consulted in order if the primary lookup fails.
The loader is Send + Sync so it can live behind the Arc<dyn Loader>
the Interpreter expects.
Fields§
§base_dir: PathBuf§extra_search_paths: Vec<PathBuf>Implementations§
Source§impl FilesystemLoader
impl FilesystemLoader
pub fn new(base_dir: impl Into<PathBuf>) -> Self
pub fn with_search_paths(self, paths: impl IntoIterator<Item = PathBuf>) -> Self
Trait Implementations§
Source§impl Clone for FilesystemLoader
impl Clone for FilesystemLoader
Source§fn clone(&self) -> FilesystemLoader
fn clone(&self) -> FilesystemLoader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FilesystemLoader
impl Debug for FilesystemLoader
Auto Trait Implementations§
impl Freeze for FilesystemLoader
impl RefUnwindSafe for FilesystemLoader
impl Send for FilesystemLoader
impl Sync for FilesystemLoader
impl Unpin for FilesystemLoader
impl UnsafeUnpin for FilesystemLoader
impl UnwindSafe for FilesystemLoader
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