[−][src]Struct bdk::database::memory::MemoryDatabase
In-memory ephemeral database
This database can be used as a temporary storage for wallets that are not kept permanently on
a device, or on platforms that don't provide a filesystem, like wasm32
.
Once it's dropped its content will be lost.
If you are looking for a permanent storage solution, you can try with the default key-value
database called [sled
]. See the database
module documentation for more defailts.
Implementations
impl MemoryDatabase
[src]
Trait Implementations
impl BatchDatabase for MemoryDatabase
[src]
type Batch = Self
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 MemoryDatabase
[src]
pub fn set_script_pubkey(
&mut self,
script: &Script,
keychain: KeychainKind,
path: u32
) -> Result<(), Error>
[src]
&mut self,
script: &Script,
keychain: KeychainKind,
path: 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,
path: u32
) -> Result<Option<Script>, Error>
[src]
&mut self,
keychain: KeychainKind,
path: 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 MemoryDatabase
[src]
type Config = ()
Type that contains the configuration
pub fn from_config(_config: &Self::Config) -> Result<Self, Error>
[src]
impl Database for MemoryDatabase
[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,
path: u32
) -> Result<Option<Script>, Error>
[src]
&self,
keychain: KeychainKind,
path: 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 MemoryDatabase
[src]
impl Default for MemoryDatabase
[src]
pub fn default() -> MemoryDatabase
[src]
impl From<<MemoryDatabase as BatchDatabase>::Batch> for AnyBatch
[src]
pub fn from(inner: <MemoryDatabase as BatchDatabase>::Batch) -> Self
[src]
impl From<MemoryDatabase> for AnyDatabase
[src]
pub fn from(inner: MemoryDatabase) -> Self
[src]
Auto Trait Implementations
impl !RefUnwindSafe for MemoryDatabase
[src]
impl !Send for MemoryDatabase
[src]
impl !Sync for MemoryDatabase
[src]
impl Unpin for MemoryDatabase
[src]
impl !UnwindSafe for MemoryDatabase
[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>,