pub struct MemStorage { /* private fields */ }Expand description
In-memory storage for tests. No disk I/O.
Implementations§
Source§impl MemStorage
impl MemStorage
Trait Implementations§
Source§impl Default for MemStorage
impl Default for MemStorage
Source§impl Storage for MemStorage
impl Storage for MemStorage
fn read(&self, path: &Path) -> Result<String>
fn write(&self, path: &Path, content: &str) -> Result<()>
fn delete(&self, path: &Path) -> Result<()>
fn list(&self, dir: &Path) -> Result<Vec<PathBuf>>
fn create_dir_all(&self, _path: &Path) -> Result<()>
fn exists(&self, path: &Path) -> bool
fn rename(&self, from: &Path, to: &Path) -> Result<()>
Auto Trait Implementations§
impl !Freeze for MemStorage
impl RefUnwindSafe for MemStorage
impl Send for MemStorage
impl Sync for MemStorage
impl Unpin for MemStorage
impl UnsafeUnpin for MemStorage
impl UnwindSafe for MemStorage
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