|
|
@ -48,6 +48,7 @@ impl Drop for CacheWrapper { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Clone)] |
|
|
|
pub struct Cache(pub(crate) Arc<CacheWrapper>); |
|
|
|
pub struct Cache(pub(crate) Arc<CacheWrapper>); |
|
|
|
|
|
|
|
|
|
|
|
impl Cache { |
|
|
|
impl Cache { |
|
|
@ -77,10 +78,6 @@ impl Cache { |
|
|
|
ffi::rocksdb_cache_set_capacity(self.0.inner, capacity); |
|
|
|
ffi::rocksdb_cache_set_capacity(self.0.inner, capacity); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fn clone(&self) -> Self { |
|
|
|
|
|
|
|
Self(self.0.clone()) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// An Env is an interface used by the rocksdb implementation to access
|
|
|
|
/// An Env is an interface used by the rocksdb implementation to access
|
|
|
@ -93,6 +90,7 @@ impl Cache { |
|
|
|
///
|
|
|
|
///
|
|
|
|
/// Note: currently, C API behinds C++ API for various settings.
|
|
|
|
/// Note: currently, C API behinds C++ API for various settings.
|
|
|
|
/// See also: `rocksdb/include/env.h`
|
|
|
|
/// See also: `rocksdb/include/env.h`
|
|
|
|
|
|
|
|
#[derive(Clone)] |
|
|
|
pub struct Env(Arc<EnvWrapper>); |
|
|
|
pub struct Env(Arc<EnvWrapper>); |
|
|
|
|
|
|
|
|
|
|
|
struct EnvWrapper { |
|
|
|
struct EnvWrapper { |
|
|
|