[−][src]Enum bdk::database::any::AnyDatabase
Type that can contain any of the Database
types defined by the library
It allows switching database type at runtime.
See this module's documentation for a usage example.
Variants
Memory(MemoryDatabase)
In-memory ephemeral database
Sled(Tree)
This is supported on crate feature
key-value-db
only.Simple key-value embedded database based on sled
Trait Implementations
impl BatchDatabase for AnyDatabase
[src]
type Batch = AnyBatch
Container for the operations
pub fn begin_batch(&self) -> Self::Batch
[src]
pub fn commit_batch(&mut self, batch: Self::Batch) -> Result<(), Error>
[src]
impl BatchOperations for AnyDatabase
[src]
pub fn set_script_pubkey(
&mut self,
script: &Script,
keychain: KeychainKind,
child: u32
) -> Result<(), Error>
[src]
&mut self,
script: &Script,
keychain: KeychainKind,
child: u32
) -> Result<(), Error>
pub fn set_utxo(&mut self, utxo: &UTXO) -> Result<(), Error>
[src]
pub fn set_raw_tx(&mut self, transaction: &Transaction) -> Result<(), Error>
[src]
pub fn set_tx(&mut self, transaction: &TransactionDetails) -> Result<(), Error>
[src]
pub fn set_last_index(
&mut self,
keychain: KeychainKind,
value: u32
) -> Result<(), Error>
[src]
&mut self,
keychain: KeychainKind,
value: u32
) -> Result<(), Error>
pub fn del_script_pubkey_from_path(
&mut self,
keychain: KeychainKind,
child: u32
) -> Result<Option<Script>, Error>
[src]
&mut self,
keychain: KeychainKind,
child: u32
) -> Result<Option<Script>, Error>
pub fn del_path_from_script_pubkey(
&mut self,
script: &Script
) -> Result<Option<(KeychainKind, u32)>, Error>
[src]
&mut self,
script: &Script
) -> Result<Option<(KeychainKind, u32)>, Error>
pub fn del_utxo(&mut self, outpoint: &OutPoint) -> Result<Option<UTXO>, Error>
[src]
pub fn del_raw_tx(&mut self, txid: &Txid) -> Result<Option<Transaction>, Error>
[src]
pub fn del_tx(
&mut self,
txid: &Txid,
include_raw: bool
) -> Result<Option<TransactionDetails>, Error>
[src]
&mut self,
txid: &Txid,
include_raw: bool
) -> Result<Option<TransactionDetails>, Error>
pub fn del_last_index(
&mut self,
keychain: KeychainKind
) -> Result<Option<u32>, Error>
[src]
&mut self,
keychain: KeychainKind
) -> Result<Option<u32>, Error>
impl ConfigurableDatabase for AnyDatabase
[src]
type Config = AnyDatabaseConfig
Type that contains the configuration
pub fn from_config(config: &Self::Config) -> Result<Self, Error>
[src]
impl Database for AnyDatabase
[src]
pub fn check_descriptor_checksum<B: AsRef<[u8]>>(
&mut self,
keychain: KeychainKind,
bytes: B
) -> Result<(), Error>
[src]
&mut self,
keychain: KeychainKind,
bytes: B
) -> Result<(), Error>
pub fn iter_script_pubkeys(
&self,
keychain: Option<KeychainKind>
) -> Result<Vec<Script>, Error>
[src]
&self,
keychain: Option<KeychainKind>
) -> Result<Vec<Script>, Error>
pub fn iter_utxos(&self) -> Result<Vec<UTXO>, Error>
[src]
pub fn iter_raw_txs(&self) -> Result<Vec<Transaction>, Error>
[src]
pub fn iter_txs(
&self,
include_raw: bool
) -> Result<Vec<TransactionDetails>, Error>
[src]
&self,
include_raw: bool
) -> Result<Vec<TransactionDetails>, Error>
pub fn get_script_pubkey_from_path(
&self,
keychain: KeychainKind,
child: u32
) -> Result<Option<Script>, Error>
[src]
&self,
keychain: KeychainKind,
child: u32
) -> Result<Option<Script>, Error>
pub fn get_path_from_script_pubkey(
&self,
script: &Script
) -> Result<Option<(KeychainKind, u32)>, Error>
[src]
&self,
script: &Script
) -> Result<Option<(KeychainKind, u32)>, Error>
pub fn get_utxo(&self, outpoint: &OutPoint) -> Result<Option<UTXO>, Error>
[src]
pub fn get_raw_tx(&self, txid: &Txid) -> Result<Option<Transaction>, Error>
[src]
pub fn get_tx(
&self,
txid: &Txid,
include_raw: bool
) -> Result<Option<TransactionDetails>, Error>
[src]
&self,
txid: &Txid,
include_raw: bool
) -> Result<Option<TransactionDetails>, Error>
pub fn get_last_index(
&self,
keychain: KeychainKind
) -> Result<Option<u32>, Error>
[src]
&self,
keychain: KeychainKind
) -> Result<Option<u32>, Error>
pub fn increment_last_index(
&mut self,
keychain: KeychainKind
) -> Result<u32, Error>
[src]
&mut self,
keychain: KeychainKind
) -> Result<u32, Error>
impl Debug for AnyDatabase
[src]
impl From<MemoryDatabase> for AnyDatabase
[src]
pub fn from(inner: MemoryDatabase) -> Self
[src]
impl From<Tree> for AnyDatabase
[src]
Auto Trait Implementations
impl !RefUnwindSafe for AnyDatabase
[src]
impl !Send for AnyDatabase
[src]
impl !Sync for AnyDatabase
[src]
impl Unpin for AnyDatabase
[src]
impl !UnwindSafe for AnyDatabase
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,