Enum bdk::wallet::NewOrLoadError
source · pub enum NewOrLoadError {
Descriptor(DescriptorError),
Persist(Error),
NotInitialized,
LoadedGenesisDoesNotMatch {
expected: BlockHash,
got: Option<BlockHash>,
},
LoadedNetworkDoesNotMatch {
expected: Network,
got: Option<Network>,
},
}
Expand description
Error type for when we try load a Wallet
from persistence and creating it if non-existent.
Methods new_or_load
and new_or_load_with_genesis_hash
may return this error.
Variants§
Descriptor(DescriptorError)
There is a problem with the passed-in descriptor.
Persist(Error)
Either writing to or loading from the persistence backend failed.
NotInitialized
Wallet is not initialized, persistence backend is empty.
LoadedGenesisDoesNotMatch
Fields
§
expected: BlockHash
The expected genesis block hash.
The loaded genesis hash does not match what was provided.
LoadedNetworkDoesNotMatch
Fields
§
expected: Network
The expected network type.
The loaded network type does not match what was provided.
Trait Implementations§
source§impl Debug for NewOrLoadError
impl Debug for NewOrLoadError
source§impl Display for NewOrLoadError
impl Display for NewOrLoadError
source§impl Error for NewOrLoadError
impl Error for NewOrLoadError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()