Enum sn_client::TransfersError[][src]

#[non_exhaustive]
pub enum TransfersError {
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(Error), Serialisation(String),
}

SafeNetwork Transfers error type

Variants (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(Error)

Other sn_data_types errors

Serialisation(String)

Serialisation

Trait Implementations

impl Debug for Error[src]

pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>[src]

Formats the value using the given formatter. Read more

impl Display for Error[src]

pub fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>[src]

Formats the value using the given formatter. Read more

impl Error for Error[src]

pub fn source(&self) -> Option<&(dyn Error + 'static)>[src]

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

fn backtrace(&self) -> Option<&Backtrace>[src]

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

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

fn description(&self) -> &str1.0.0[src]

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

fn cause(&self) -> Option<&dyn Error>1.0.0[src]

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

impl From<Error> for Error[src]

pub fn from(source: Error) -> Error[src]

Performs the conversion.

impl From<Error> for Error[src]

fn from(source: TransfersError) -> Self[src]

Performs the conversion.

impl PartialEq<Error> for Error[src]

pub fn eq(&self, other: &Error) -> bool[src]

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

pub fn ne(&self, other: &Error) -> bool[src]

This method tests for !=.

impl StructuralPartialEq for Error[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> AsFail for T where
    T: Fail, 

pub fn as_fail(&self) -> &(dyn Fail + 'static)

Converts a reference to Self into a dynamic trait object of Fail.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<E> Fail for E where
    E: 'static + Error + Send + Sync

fn name(&self) -> Option<&str>

Returns the “name” of the error. Read more

fn cause(&self) -> Option<&(dyn Fail + 'static)>

Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more

fn backtrace(&self) -> Option<&Backtrace>

Returns a reference to the Backtrace carried by this failure, if it carries one. Read more

fn context<D>(self, context: D) -> Context<D> where
    D: Display + Send + Sync + 'static, 

Provides context for this failure. Read more

fn compat(self) -> Compat<Self>

Wraps this failure in a compatibility wrapper that implements std::error::Error. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

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

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

fn in_current_span(self) -> Instrumented<Self>[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.

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

pub fn vzip(self) -> V