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)
key-value-db
only.Simple key-value embedded database based on sled
Sqlite(<SqliteDatabase as BatchDatabase>::Batch)
sqlite
only.Sqlite embedded database using rusqlite
Trait Implementations
sourceimpl BatchOperations for AnyBatch
impl BatchOperations for AnyBatch
sourcefn 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.
sourcefn set_raw_tx(&mut self, transaction: &Transaction) -> Result<(), Error>
fn set_raw_tx(&mut self, transaction: &Transaction) -> Result<(), Error>
Store a raw transaction
sourcefn set_tx(&mut self, transaction: &TransactionDetails) -> Result<(), Error>
fn set_tx(&mut self, transaction: &TransactionDetails) -> Result<(), Error>
Store the metadata of a transaction
sourcefn 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.
sourcefn 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.
sourcefn 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. Read more
sourcefn 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
sourcefn 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
sourcefn 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.
sourceimpl From<<MemoryDatabase as BatchDatabase>::Batch> for AnyBatch
impl From<<MemoryDatabase as BatchDatabase>::Batch> for AnyBatch
sourcefn from(inner: <MemoryDatabase as BatchDatabase>::Batch) -> Self
fn from(inner: <MemoryDatabase as BatchDatabase>::Batch) -> Self
Performs the conversion.
sourceimpl From<<SqliteDatabase as BatchDatabase>::Batch> for AnyBatch
impl From<<SqliteDatabase as BatchDatabase>::Batch> for AnyBatch
sourcefn from(inner: <SqliteDatabase as BatchDatabase>::Batch) -> Self
fn from(inner: <SqliteDatabase as BatchDatabase>::Batch) -> Self
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for AnyBatch
impl Send for AnyBatch
impl !Sync for AnyBatch
impl Unpin for AnyBatch
impl !UnwindSafe for AnyBatch
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more