pub struct SourceReader { /* private fields */ }Implementations§
Source§impl SourceReader
impl SourceReader
pub fn new( base_dir: Option<PathBuf>, working_dir: PathBuf, vfs: Box<dyn VirtualFs>, ) -> SourceReader
Sourcepub fn local_fs(base_dir: PathBuf, working_dir: PathBuf) -> SourceReader
pub fn local_fs(base_dir: PathBuf, working_dir: PathBuf) -> SourceReader
Create a SourceReader that reads from local file system.
Sourcepub fn fs_lib_and_string(
base_dir: PathBuf,
source: Cow<'static, str>,
) -> (SourceReader, PathBuf)
pub fn fs_lib_and_string( base_dir: PathBuf, source: Cow<'static, str>, ) -> (SourceReader, PathBuf)
Create a SourceReader that reads from a zip file and a string.
Trait Implementations§
Source§impl SourceRead for SourceReader
impl SourceRead for SourceReader
fn working_dir(&self) -> &Path
fn base_dir(&self) -> Option<&Path>
fn read_file(&self, path: &Path) -> Result<String>
fn read_dir(&self, path: &Path) -> Result<Vec<PathBuf>>
fn is_file(&self, path: &Path) -> bool
fn is_dir(&self, path: &Path) -> bool
fn canonicalize_import(&self, key: &ImportKey) -> Result<(PathBuf, String)>
Auto Trait Implementations§
impl Freeze for SourceReader
impl !RefUnwindSafe for SourceReader
impl !Send for SourceReader
impl !Sync for SourceReader
impl Unpin for SourceReader
impl UnsafeUnpin for SourceReader
impl !UnwindSafe for SourceReader
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