pub enum Error {
Show 30 variants
AccountAliasAlreadyExists(String),
AccountNotFound(String),
AddressNotFoundInAccount(Bech32Address),
Backup(&'static str),
Block(Box<Error>),
BurningOrMeltingFailed(String),
Client(Box<Error>),
ConsolidationRequired {
output_count: usize,
output_count_max: u16,
},
Crypto(Error),
CustomInput(String),
FailedToGetRemainder,
InsufficientFunds {
available: u64,
required: u64,
},
InvalidCoinType {
new_coin_type: u32,
existing_coin_type: u32,
},
InvalidMnemonic(String),
InvalidOutputKind(String),
Io(Error),
Json(Error),
Migration(String),
MintingFailed(String),
MissingParameter(&'static str),
NftNotFoundInUnspentOutputs,
NoOutputsToConsolidate {
available_outputs: usize,
consolidation_threshold: usize,
},
Other(Box<dyn Error + Send + Sync>),
Participation(Error),
Storage(String),
StorageIsEncrypted,
TaskJoin(JoinError),
TransactionNotFound(TransactionId),
Voting(String),
InvalidVotingPower,
}wallet only.Expand description
The wallet error type.
Variants§
AccountAliasAlreadyExists(String)
Account alias must be unique.
AccountNotFound(String)
Account not found
AddressNotFoundInAccount(Bech32Address)
Address not found in account
Backup(&'static str)
Errors during backup creation or restoring
Block(Box<Error>)
Error from block crate.
BurningOrMeltingFailed(String)
Burning or melting failed
Client(Box<Error>)
Client error.
ConsolidationRequired
Funds are spread over too many outputs
Crypto(Error)
Crypto.rs error
CustomInput(String)
Custom input error
FailedToGetRemainder
Failed to get remainder
InsufficientFunds
Insufficient funds to send transaction.
InvalidCoinType
Invalid coin type, all accounts need to have the same coin type
InvalidMnemonic(String)
Invalid mnemonic error
InvalidOutputKind(String)
Invalid output kind.
Io(Error)
IO error. (storage, backup, restore)
Json(Error)
serde_json error.
Migration(String)
Error migrating storage or backup
MintingFailed(String)
Minting failed
MissingParameter(&'static str)
Missing parameter.
NftNotFoundInUnspentOutputs
Nft not found in unspent outputs
NoOutputsToConsolidate
No outputs available for consolidating
Fields
Other(Box<dyn Error + Send + Sync>)
Errors not covered by other variants.
Participation(Error)
participation only.Participation error
Storage(String)
Storage access error.
StorageIsEncrypted
Can’t use Wallet API because the storage is encrypted
TaskJoin(JoinError)
Tokio task join error
TransactionNotFound(TransactionId)
Transaction not found
Voting(String)
participation only.Voting error
InvalidVotingPower
participation only.Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more