pub struct StringLoader(pub String);Tuple Fields§
§0: StringTrait Implementations§
Source§impl FileLoader for StringLoader
impl FileLoader for StringLoader
Source§fn file_exists(&self, _: &Path) -> bool
fn file_exists(&self, _: &Path) -> bool
Query the existence of a file.
Source§fn read_file(&self, _: &Path) -> Result<String>
fn read_file(&self, _: &Path) -> Result<String>
Read the contents of a UTF-8 file into memory.
This function must return a String because we normalize
source files, which may require resizing.
Source§fn read_binary_file(&self, path: &Path) -> Result<Arc<[u8]>>
fn read_binary_file(&self, path: &Path) -> Result<Arc<[u8]>>
Read the contents of a potentially non-UTF-8 file into memory.
We don’t normalize binary files, so we can start in an Arc.
Source§fn current_directory(&self) -> Result<PathBuf>
fn current_directory(&self) -> Result<PathBuf>
Current working directory
Auto Trait Implementations§
impl Freeze for StringLoader
impl RefUnwindSafe for StringLoader
impl Send for StringLoader
impl Sync for StringLoader
impl Unpin for StringLoader
impl UnsafeUnpin for StringLoader
impl UnwindSafe for StringLoader
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