pub struct MemoryVfs { /* private fields */ }Expand description
A memory-based Virtual File System implementation. Ideal for WASM environments or testing where physical disk access is not available.
Implementations§
Trait Implementations§
Source§impl Vfs for MemoryVfs
impl Vfs for MemoryVfs
Source§type Source = SourceText
type Source = SourceText
The type of source returned by this VFS.
Source§fn get_source(&self, uri: &str) -> Option<SourceText>
fn get_source(&self, uri: &str) -> Option<SourceText>
Get the source for the given URI.
Source§fn read_dir(&self, _uri: &str) -> Option<Vec<String>>
fn read_dir(&self, _uri: &str) -> Option<Vec<String>>
Read the contents of a directory at the given URI.
Returns a list of URIs or names.
fn line_map(&self, uri: &str) -> Option<LineMap>
Source§impl WritableVfs for MemoryVfs
impl WritableVfs for MemoryVfs
Source§fn write_file(&self, uri: &str, content: String)
fn write_file(&self, uri: &str, content: String)
Update or create a file with the given content.
Source§fn remove_file(&self, uri: &str)
fn remove_file(&self, uri: &str)
Remove a file from the VFS.
Auto Trait Implementations§
impl Freeze for MemoryVfs
impl RefUnwindSafe for MemoryVfs
impl Send for MemoryVfs
impl Sync for MemoryVfs
impl Unpin for MemoryVfs
impl UnwindSafe for MemoryVfs
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