pub enum AnyBatch {
Memory(<MemoryDatabase as BatchDatabase>::Batch),
Sled(<Tree as BatchDatabase>::Batch),
Sqlite(<SqliteDatabase as BatchDatabase>::Batch),
}
Expand description
Type that contains any of the BatchDatabase::Batch
types defined by the library
Variants§
Memory(<MemoryDatabase as BatchDatabase>::Batch)
In-memory ephemeral database
Sled(<Tree as BatchDatabase>::Batch)
Available on crate feature
key-value-db
only.Simple key-value embedded database based on sled
Sqlite(<SqliteDatabase as BatchDatabase>::Batch)
Available on crate feature
sqlite
only.Sqlite embedded database using rusqlite
Trait Implementations§
source§impl BatchOperations for AnyBatch
impl BatchOperations for AnyBatch
source§fn set_script_pubkey(
&mut self,
script: &Script,
keychain: KeychainKind,
child: u32
) -> Result<(), Error>
fn set_script_pubkey(
&mut self,
script: &Script,
keychain: KeychainKind,
child: u32
) -> Result<(), Error>
Store a script_pubkey along with its keychain and child number.
source§fn set_raw_tx(&mut self, transaction: &Transaction) -> Result<(), Error>
fn set_raw_tx(&mut self, transaction: &Transaction) -> Result<(), Error>
Store a raw transaction
source§fn set_tx(&mut self, transaction: &TransactionDetails) -> Result<(), Error>
fn set_tx(&mut self, transaction: &TransactionDetails) -> Result<(), Error>
Store the metadata of a transaction
source§fn set_last_index(
&mut self,
keychain: KeychainKind,
value: u32
) -> Result<(), Error>
fn set_last_index(
&mut self,
keychain: KeychainKind,
value: u32
) -> Result<(), Error>
Store the last derivation index for a given keychain.
source§fn del_script_pubkey_from_path(
&mut self,
keychain: KeychainKind,
child: u32
) -> Result<Option<Script>, Error>
fn del_script_pubkey_from_path(
&mut self,
keychain: KeychainKind,
child: u32
) -> Result<Option<Script>, Error>
Delete a script_pubkey given the keychain and its child number.
source§fn del_path_from_script_pubkey(
&mut self,
script: &Script
) -> Result<Option<(KeychainKind, u32)>, Error>
fn del_path_from_script_pubkey(
&mut self,
script: &Script
) -> Result<Option<(KeychainKind, u32)>, Error>
Delete the data related to a specific script_pubkey, meaning the keychain and the child
number.
source§fn del_raw_tx(&mut self, txid: &Txid) -> Result<Option<Transaction>, Error>
fn del_raw_tx(&mut self, txid: &Txid) -> Result<Option<Transaction>, Error>
Delete a raw transaction given its
Txid
source§fn del_tx(
&mut self,
txid: &Txid,
include_raw: bool
) -> Result<Option<TransactionDetails>, Error>
fn del_tx(
&mut self,
txid: &Txid,
include_raw: bool
) -> Result<Option<TransactionDetails>, Error>
Delete the metadata of a transaction and optionally the raw transaction itself
source§fn del_last_index(
&mut self,
keychain: KeychainKind
) -> Result<Option<u32>, Error>
fn del_last_index(
&mut self,
keychain: KeychainKind
) -> Result<Option<u32>, Error>
Delete the last derivation index for a keychain.
source§impl From<<MemoryDatabase as BatchDatabase>::Batch> for AnyBatch
impl From<<MemoryDatabase as BatchDatabase>::Batch> for AnyBatch
source§fn from(inner: <MemoryDatabase as BatchDatabase>::Batch) -> Self
fn from(inner: <MemoryDatabase as BatchDatabase>::Batch) -> Self
Converts to this type from the input type.
source§impl From<<SqliteDatabase as BatchDatabase>::Batch> for AnyBatch
impl From<<SqliteDatabase as BatchDatabase>::Batch> for AnyBatch
source§fn from(inner: <SqliteDatabase as BatchDatabase>::Batch) -> Self
fn from(inner: <SqliteDatabase as BatchDatabase>::Batch) -> Self
Converts to this type from the input type.