Enum bdk::database::any::AnyDatabase [−][src]
pub enum AnyDatabase { Memory(MemoryDatabase), Sled(Tree), }
Expand description
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)
key-value-db
only.Simple key-value embedded database based on sled
Trait Implementations
fn set_script_pubkey(
&mut self,
script: &Script,
keychain: KeychainKind,
child: u32
) -> Result<(), Error>
[src]
fn set_script_pubkey(
&mut self,
script: &Script,
keychain: KeychainKind,
child: u32
) -> Result<(), Error>
[src]Store a script_pubkey along with its keychain and child number.
Store a raw transaction
Store the metadata of a transaction
Store the last derivation index for a given keychain.
fn del_script_pubkey_from_path(
&mut self,
keychain: KeychainKind,
child: u32
) -> Result<Option<Script>, Error>
[src]
fn del_script_pubkey_from_path(
&mut self,
keychain: KeychainKind,
child: u32
) -> Result<Option<Script>, Error>
[src]Delete a script_pubkey given the keychain and its child number.
fn del_path_from_script_pubkey(
&mut self,
script: &Script
) -> Result<Option<(KeychainKind, u32)>, Error>
[src]
fn del_path_from_script_pubkey(
&mut self,
script: &Script
) -> Result<Option<(KeychainKind, u32)>, Error>
[src]Delete the data related to a specific script_pubkey, meaning the keychain and the child number. Read more
Delete a raw transaction given its Txid
Delete the metadata of a transaction and optionally the raw transaction itself
Delete the last derivation index for a keychain.
type Config = AnyDatabaseConfig
type Config = AnyDatabaseConfig
Type that contains the configuration
Create a new instance given a configuration
fn check_descriptor_checksum<B: AsRef<[u8]>>(
&mut self,
keychain: KeychainKind,
bytes: B
) -> Result<(), Error>
[src]
fn check_descriptor_checksum<B: AsRef<[u8]>>(
&mut self,
keychain: KeychainKind,
bytes: B
) -> Result<(), Error>
[src]Read and checks the descriptor checksum for a given keychain. Read more
Return the list of script_pubkeys
Return the list of raw transactions
Return the list of transactions metadata
fn get_script_pubkey_from_path(
&self,
keychain: KeychainKind,
child: u32
) -> Result<Option<Script>, Error>
[src]
fn get_script_pubkey_from_path(
&self,
keychain: KeychainKind,
child: u32
) -> Result<Option<Script>, Error>
[src]Fetch a script_pubkey given the child number of a keychain.
fn get_path_from_script_pubkey(
&self,
script: &Script
) -> Result<Option<(KeychainKind, u32)>, Error>
[src]
fn get_path_from_script_pubkey(
&self,
script: &Script
) -> Result<Option<(KeychainKind, u32)>, Error>
[src]Fetch the keychain and child number of a given script_pubkey
Fetch a raw transaction given its Txid
Fetch the transaction metadata and optionally also the raw transaction
Return the last defivation index for a keychain.
Increment the last derivation index for a keychain and return it Read more
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for AnyDatabase
impl !Send for AnyDatabase
impl !Sync for AnyDatabase
impl Unpin for AnyDatabase
impl !UnwindSafe for AnyDatabase
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V