Struct bitcoin_db::DBWrapper
source · pub struct DBWrapper { /* private fields */ }
Expand description
Implementations§
source§impl DBWrapper
impl DBWrapper
pub fn read<K, V>(&self, key: &K, value: &mut V) -> bool
pub fn write<K, V>(&mut self, key: &K, value: &V, sync: Option<bool>) -> bool
pub fn exists<K>(&self, key: &K) -> bool
pub fn erase<K>(&mut self, key: &K, sync: Option<bool>) -> bool
pub fn new_iterator(&mut self) -> *mut DBIterator<'_>
pub fn estimate_size<K>(&self, key_begin: &K, key_end: &K) -> usize
sourcepub fn compact_range<K>(&self, key_begin: &K, key_end: &K)
pub fn compact_range<K>(&self, key_begin: &K, key_end: &K)
| Compact a certain range of keys in the | database. |
sourcepub fn new(
path: &Path,
n_cache_size: usize,
memory: Option<bool>,
wipe: Option<bool>,
obfuscate: Option<bool>
) -> Self
pub fn new( path: &Path, n_cache_size: usize, memory: Option<bool>, wipe: Option<bool>, obfuscate: Option<bool> ) -> Self
| @param[in] path | | Location in the filesystem where leveldb | data will be stored. | ––––– | @param[in] nCacheSize | | Configures various leveldb cache settings. | ––––– | @param[in] fMemory | | If true, use leveldb’s memory environment. | ––––– | @param[in] fWipe | | If true, remove all existing data. | ––––– | @param[in] obfuscate | | If true, store data obfuscated via simple | XOR. If false, XOR with a zero’d byte | array. |
pub fn write_batch(&mut self, batch: &mut DBBatch, sync: Option<bool>) -> bool
sourcepub fn dynamic_memory_usage(&self) -> Option<usize>
pub fn dynamic_memory_usage(&self) -> Option<usize>
| Get an estimate of LevelDB memory usage | (in bytes). |
sourcepub fn create_obfuscate_key(&self) -> Vec<u8>
pub fn create_obfuscate_key(&self) -> Vec<u8>
| Returns a string (consisting of 8 random | bytes) suitable for use as an obfuscating | XOR key. |
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DBWrapper
impl !Send for DBWrapper
impl !Sync for DBWrapper
impl Unpin for DBWrapper
impl !UnwindSafe for DBWrapper
Blanket Implementations§
§impl<T, U> CastInto<U> for Twhere
U: CastFrom<T>,
impl<T, U> CastInto<U> for Twhere U: CastFrom<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> StaticUpcast<T> for T
impl<T> StaticUpcast<T> for T
§unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
Convert type of a const pointer. Read more