Struct bitcoin_bdb::BerkeleyDatabase
source · pub struct BerkeleyDatabase { /* private fields */ }
Expand description
| An instance of this class represents | one database. | | For BerkeleyDB this is just a (env, strFile) | tuple. |
Implementations§
source§impl BerkeleyDatabase
impl BerkeleyDatabase
sourcepub fn verify(&mut self, error_str: &mut BilingualStr) -> bool
pub fn verify(&mut self, error_str: &mut BilingualStr) -> bool
| Verifies the environment and database | file |
pub fn increment_update_counter(&mut self)
sourcepub fn rewrite(&mut self, psz_skip: *const u8) -> bool
pub fn rewrite(&mut self, psz_skip: *const u8) -> bool
| Rewrite the entire database on disk, | with the exception of key pszSkip if | non-zero |
sourcepub fn new(env: Arc<BerkeleyEnvironment>, filename: String) -> Self
pub fn new(env: Arc<BerkeleyEnvironment>, filename: String) -> Self
| Create DB handle to real database |
pub fn format(&mut self) -> String
sourcepub fn periodic_flush(&mut self) -> bool
pub fn periodic_flush(&mut self) -> bool
| flush the wallet passively (TRY_LOCK) | ideal to be called periodically |
sourcepub fn close(&mut self)
pub fn close(&mut self)
| Flush to the database file and close | the database. | | Also close the environment if no other | databases are open in it. |
pub fn reload_db_env(&mut self)
sourcepub fn remove_ref(&mut self)
pub fn remove_ref(&mut self)
| Indicate that database user has stopped | using the database and that it could | be flushed or closed. |
sourcepub fn make_batch(&mut self, flush_on_close: Option<bool>) -> Box<DatabaseBatch>
pub fn make_batch(&mut self, flush_on_close: Option<bool>) -> Box<DatabaseBatch>
| Make a BerkeleyBatch connected to this | database |
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for BerkeleyDatabase
impl Send for BerkeleyDatabase
impl Sync for BerkeleyDatabase
impl Unpin for BerkeleyDatabase
impl !UnwindSafe for BerkeleyDatabase
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