Enum safe_network::transfers::Error[][src]

#[non_exhaustive]
pub enum Error {
Show variants MissingSender, MissingRecipient, SameSenderAndRecipient, DebitPending, SectionKeyNeverExisted, DebitProposed, CreditDebitIdMismatch, CreditDebitValueMismatch, WrongValidationActor, PendingTransferNotFound, NoSetForDebitId(Dot<PublicKey>), NoSetForTransferId(Dot<PublicKey>), OperationOutOfOrder(u64u64), ShouldBeInitialOperation, NoActorHistory, ZeroValueTransfer, ValidatedAlready, DebitDoesNotBelong(PublicKeyDebit), CreditDoesNotBelong(PublicKeyCredit), SubtractionOverflow(TokenToken), AdditionOverflow(TokenToken), ReceiveValidationFailed, TransferCreationFailed, SenderValidationFailed, RegisterProofFailed, InvalidCreditOrDebit, CouldNotGetWalletForReplica, CouldNotFindGroup, ReceivePropagationFailed, SyncFailed, ValidationFailed, GenesisFailed, Unknown(String), WalletNotFound(PublicKey), CannotAggregate, InvalidSignature, InvalidOperation, InvalidOwner, InsufficientBalance, NoSuchSender, NoSuchRecipient, KeyExists, NetworkDataError(DtError), Serialisation(String),
}
Expand description

SafeNetwork Transfers error type

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
MissingSender

Missing sender actor

MissingRecipient

Missing recipient

SameSenderAndRecipient

Sender and receiver are the same

DebitPending

A debit is awaiting completion. A new debit cannot be started.

SectionKeyNeverExisted

The provided PublicKey does not correlate with any key in the section chain history.

DebitProposed

The proposed debit has already been seen, or is not the next expected debit

CreditDebitIdMismatch

Credit Id and debit Id do not match

CreditDebitValueMismatch

Credit and debits do not have the same value

WrongValidationActor

This is not the correct actor to validate

PendingTransferNotFound

No pending transfer could be found awaiting accumulation

NoSetForDebitId(Dot<PublicKey>)

Validation is not for this actor

NoSetForTransferId(Dot<PublicKey>)

Transer is not for this actor

OperationOutOfOrder(u64u64)

Proposed operation is not the next in sequence. The debit op should be current actor count + 1

ShouldBeInitialOperation

This account has not seen any debits yet. Sent debit should be 0 but was not.

NoActorHistory

No credits or debits were found to sync

ZeroValueTransfer

0-value transfers are invalid

ValidatedAlready

The validation has already been received

DebitDoesNotBelong(PublicKeyDebit)

Debit is not from this wallet

CreditDoesNotBelong(PublicKeyCredit)

Credit is not to this wallet

SubtractionOverflow(TokenToken)

Subtracting this transfer would cause an overlow

AdditionOverflow(TokenToken)

Adding this transfer would cause an overflow

ReceiveValidationFailed

Receive validation failed..

TransferCreationFailed

TransferCreationFailed..

SenderValidationFailed

SenderValidationFailed..

RegisterProofFailed

RegisterProofFailed..

InvalidCreditOrDebit

InvalidCreditOrDebit..

CouldNotGetWalletForReplica

CouldNotGetWalletForReplica..

CouldNotFindGroup

CouldNotFindGroup..

ReceivePropagationFailed

ReceivePropagationFailed..

SyncFailed

SyncFailed..

ValidationFailed

ValidationFailed..

GenesisFailed

GetGenesisFailed..

Unknown(String)

Unknown error

WalletNotFound(PublicKey)

Wallet not found

CannotAggregate

Signature shares are insufficient for BLS aggregation

InvalidSignature

Signature is not valid

InvalidOperation

Operation is not valid

InvalidOwner

Owner is not valid

InsufficientBalance

Insufficient coins.

NoSuchSender

Inexistent sender balance.

NoSuchRecipient

Inexistent recipient balance. Currently only thrown during network genesis

KeyExists

Balance key already exists.

NetworkDataError(DtError)

Other types errors

Serialisation(String)

Serialisation

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Performs the conversion.

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

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

Performs the conversion.

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

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. 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.