logo
pub struct MemoryDatabase { /* private fields */ }
Expand description

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 details.

Implementations

Create a new empty database

Trait Implementations

Container for the operations

Create a new batch container

Consume and apply a batch of operations

Store a script_pubkey along with its keychain and child number.

Store a LocalUtxo

Store a raw transaction

Store the metadata of a transaction

Store the last derivation index for a given keychain.

Store the sync time

Delete a script_pubkey given the keychain and its child number.

Delete the data related to a specific script_pubkey, meaning the keychain and the child number. Read more

Delete a LocalUtxo given its OutPoint

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.

Reset the sync time to None Read more

Type that contains the configuration

Create a new instance given a configuration

Read and checks the descriptor checksum for a given keychain. Read more

Return the list of script_pubkeys

Return the list of LocalUtxos

Return the list of raw transactions

Return the list of transactions metadata

Fetch a script_pubkey given the child number of a keychain.

Fetch the keychain and child number of a given script_pubkey

Fetch a LocalUtxo given its OutPoint

Fetch a raw transaction given its Txid

Fetch the transaction metadata and optionally also the raw transaction

Return the last derivation index for a keychain.

Return the sync time, if present

Increment the last derivation index for a keychain and return it Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.