Struct rusty_leveldb_arc::MemEnv
source · pub struct MemEnv(_);
Expand description
MemEnv is an in-memory environment that can be used for testing or ephemeral databases. The performance will be better than what a disk environment delivers.
Implementations§
Trait Implementations§
source§impl Env for MemEnv
impl Env for MemEnv
fn open_sequential_file(&self, p: &Path) -> Result<Box<dyn Read>>
fn open_random_access_file(&self, p: &Path) -> Result<Box<dyn RandomAccess>>
fn open_writable_file(&self, p: &Path) -> Result<Box<dyn Write>>
fn open_appendable_file(&self, p: &Path) -> Result<Box<dyn Write>>
fn exists(&self, p: &Path) -> Result<bool>
fn children(&self, p: &Path) -> Result<Vec<PathBuf>>
fn size_of(&self, p: &Path) -> Result<usize>
fn delete(&self, p: &Path) -> Result<()>
fn mkdir(&self, p: &Path) -> Result<()>
fn rmdir(&self, p: &Path) -> Result<()>
fn rename(&self, old: &Path, new: &Path) -> Result<()>
fn lock(&self, p: &Path) -> Result<FileLock>
fn unlock(&self, p: FileLock) -> Result<()>
fn micros(&self) -> u64
fn sleep_for(&self, micros: u32)
fn new_logger(&self, p: &Path) -> Result<Logger>
Auto Trait Implementations§
impl RefUnwindSafe for MemEnv
impl Send for MemEnv
impl Sync for MemEnv
impl Unpin for MemEnv
impl UnwindSafe for MemEnv
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