Enum rgb_lib::Error

source ·
pub enum Error {
Show 58 variants AllocationsAlreadyAvailable, AssetNotFound { asset_id: String, }, BatchTransferNotFound { txid: String, }, CannotChangeOnline, CannotDeleteTransfer, CannotFailTransfer, Electrum { details: String, }, FailedBdkSync { details: String, }, FailedBroadcast { details: String, }, FailedIssuance { details: String, }, FileAlreadyExists { path: String, }, IO { details: String, }, Inconsistency { details: String, }, InexistentDataDir, InsufficientAllocationSlots, InsufficientBitcoins { needed: u64, available: u64, }, InsufficientSpendableAssets { asset_id: String, }, InsufficientTotalAssets { asset_id: String, }, Internal { details: String, }, InvalidAddress { details: String, }, InvalidAmountZero, InvalidAssetID { asset_id: String, }, InvalidBitcoinKeys, InvalidBitcoinNetwork { network: String, }, InvalidBlindedUTXO { details: String, }, InvalidRecipientID, InvalidTransportEndpoint { details: String, }, InvalidTransportEndpoints { details: String, }, InvalidDescription { details: String, }, InvalidElectrum { details: String, }, InvalidFeeRate { details: String, }, InvalidFilePath { file_path: String, }, InvalidInvoice { details: String, }, InvalidInvoiceData { details: String, }, InvalidMnemonic { details: String, }, InvalidName { details: String, }, InvalidPrecision { details: String, }, InvalidPsbt { details: String, }, InvalidPubkey { details: String, }, InvalidScript { details: String, }, InvalidTicker { details: String, }, InvalidVanillaKeychain, NoIssuanceAmounts, NoValidTransportEndpoint, Offline, OutputBelowDustLimit, Proxy { details: String, }, RecipientIDAlreadyUsed, RecipientIDDuplicated, TooHighIssuanceAmounts, TransferNotFound { recipient_id: String, }, UnknownRgbInterface { interface: String, }, UnknownRgbSchema { schema_id: String, }, UnsupportedBackupVersion { version: String, }, UnsupportedTransportType, UnsupportedInvoice, WatchOnly, WrongPassword,
}
Expand description

The error variants returned by functions.

Variants§

§

AllocationsAlreadyAvailable

No need to create more allocations

§

AssetNotFound

Fields

§asset_id: String

Asset ID

Requested asset was not found

§

BatchTransferNotFound

Fields

§txid: String

Transaction ID

The requested batch transfer was not found

§

CannotChangeOnline

A wallet cannot go online twice with different data

§

CannotDeleteTransfer

Requested transfer cannot be deleted

§

CannotFailTransfer

Requested transfer cannot be failed

§

Electrum

Fields

§details: String

Error details

An error was received from the Electrum server

§

FailedBdkSync

Fields

§details: String

Error details

Syncing BDK with the blockchain has failed

§

FailedBroadcast

Fields

§details: String

Error details

Broadcasting the PSBT has failed

§

FailedIssuance

Fields

§details: String

Error details

Issued RGB asset has failed the validity check

§

FileAlreadyExists

Fields

§path: String

The file path

The file already exists

§

IO

Fields

§details: String

Error details

An I/O error has been encountered

§

Inconsistency

Fields

§details: String

Error details

An inconsistency has been detected between the wallet’s internal (database) and external (BDK, RGB) data

§

InexistentDataDir

The provided directory does not exist

§

InsufficientAllocationSlots

There are not enough available allocation slots (UTXOs with available slots)

§

InsufficientBitcoins

Fields

§needed: u64

Sats needed for some transaction

§available: u64

Sats available for spending

There are not enough bitcoins to fulfill the request

§

InsufficientSpendableAssets

Fields

§asset_id: String

Asset ID

There are not enough spendable tokens of the requested asset to fulfill the request

§

InsufficientTotalAssets

Fields

§asset_id: String

Asset ID

There are not enough total tokens of the requested asset to fulfill the request

§

Internal

Fields

§details: String

Error details

An internal error has been encountered

§

InvalidAddress

Fields

§details: String

Error details

An invalid bitcoin address has been provided

§

InvalidAmountZero

An invalid 0 amount has been provided

§

InvalidAssetID

Fields

§asset_id: String

Asset ID

An invalid asset ID has been provided

§

InvalidBitcoinKeys

Keys derived from the provided data do not match

§

InvalidBitcoinNetwork

Fields

§network: String

The invalid network

Invalid bitcoin network

§

InvalidBlindedUTXO

Fields

§details: String

Error details

The provided blinded UTXO is invalid

§

InvalidRecipientID

The provided recipient ID is neither a blinded UTXO or a script

§

InvalidTransportEndpoint

Fields

§details: String

Error details

The provided transport endpoint is invalid

§

InvalidTransportEndpoints

Fields

§details: String

Error details

The provided transport endpoints are invalid

§

InvalidDescription

Fields

§details: String

Error details

The provided asset description is invalid

§

InvalidElectrum

Fields

§details: String

Error details

Electrum server is for the wrong network or does not provide the required functionality

There are multiple electrum server variants and one with verbose support in blockchain.transaction.get is required, see this issue on blockstream’s electrs fork for more info

§

InvalidFeeRate

Fields

§details: String

Error details

The provided fee rate is invalid

§

InvalidFilePath

Fields

§file_path: String

File path

The provided file path is invalid

§

InvalidInvoice

Fields

§details: String

Error details

The provided invoice is invalid

§

InvalidInvoiceData

Fields

§details: String

Error details

The provided invoice data is invalid

§

InvalidMnemonic

Fields

§details: String

Error details

The provided mnemonic phrase is invalid

§

InvalidName

Fields

§details: String

Error details

The provided asset name is invalid

§

InvalidPrecision

Fields

§details: String

Error details

The provided asset precision is invalid

§

InvalidPsbt

Fields

§details: String

Error details

The provided PSBT could not be parsed

§

InvalidPubkey

Fields

§details: String

Error details

The provided pubkey is invalid

§

InvalidScript

Fields

§details: String

Error details

The provided script is invalid

§

InvalidTicker

Fields

§details: String

Error details

The provided asset ticker is invalid

§

InvalidVanillaKeychain

The provided vanilla keychain is invalid

§

NoIssuanceAmounts

Cannot issue an asset without knowing the amounts

§

NoValidTransportEndpoint

No valid transport endpoint found

§

Offline

Trying to perform an online operation with offline wallet

§

OutputBelowDustLimit

Output created is under the dust limit

§

Proxy

Fields

§details: String

Error details

Error contacting the RGB proxy

§

RecipientIDAlreadyUsed

Provided recipient ID has already been used for another transfer

§

RecipientIDDuplicated

Provided recipient map has duplicated recipient IDs

§

TooHighIssuanceAmounts

Trying to issue too many assets

§

TransferNotFound

Fields

§recipient_id: String

Recipient ID

The requested transfer was not found

§

UnknownRgbInterface

Fields

§interface: String

RGB interface

The detected RGB interface is unknown

§

UnknownRgbSchema

Fields

§schema_id: String

RGB schema ID

The detected RGB schema is unknown

§

UnsupportedBackupVersion

Fields

§version: String

Backup version

The backup version is not supported

§

UnsupportedTransportType

The given transport type is not supported

§

UnsupportedInvoice

The given invoice type is not supported

§

WatchOnly

The requested operation cannot be processed by a watch-only wallet

§

WrongPassword

The provided password is incorrect

Trait Implementations§

source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for Error

1.30.0 · source§

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

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<Error> for Error

source§

fn from(e: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(e: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(e: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(e: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(e: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(e: Error) -> Self

Converts to this type from the input type.
source§

impl From<PsbtParseError> for Error

source§

fn from(e: PsbtParseError) -> Self

Converts to this type from the input type.
source§

impl From<TransportParseError> for Error

source§

fn from(e: TransportParseError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
source§

impl<T> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,