Enum sn_client::ErrorMessage[][src]

#[non_exhaustive]
pub enum ErrorMessage {
Show variants UnsupportedVersion(u16), UnsupportedSerialization(u16), AccessDenied(PublicKey), SignatureVerification(String), Serialization(String), DataNotFound(DataAddress), NoHistoryForPublicKey(PublicKey), FailedToWriteFile, DataExists, NoSuchEntry, TooManyEntries, NoSuchKey, NotEnoughSpace, DuplicateEntryKeys, InvalidOwners(PublicKey), PolicyNotSet, InvalidSuccessor(u64), InvalidOwnersSuccessor(u64), OpNotCausallyReady, InvalidPermissionsSuccessor(u64), InvalidOperation(String), SigningKeyTypeMismatch, InvalidSignature, DuplicateMessageId, LossOfPrecision, ExcessiveValue, TransactionIdExists, InsufficientBalance, NoSuchBalance, NoSuchSender, NoSuchRecipient, BalanceExists, ExceededSize, CrdtMissingOpSignature, CrdtUnexpectedState, EntryExists(u8), PaymentFailed, FailedToDelete, NodeWasNotRelocated, TargetSection(Error),
}

Main error type for the crate.

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.
UnsupportedVersion(u16)

Message read was built with an unsupported version.

UnsupportedSerialization(u16)

Message read contains a payload with an unsupported serialization type.

AccessDenied(PublicKey)

Access denied for supplied PublicKey

SignatureVerification(String)

Error occurred when atempting to verify signature

Serialization(String)

Serialization error

DataNotFound(DataAddress)

Requested data not found

NoHistoryForPublicKey(PublicKey)

No history found for PublicKey

FailedToWriteFile

Failed to write file, likely due to a system Io error

DataExists

Provided data already exists on the network

NoSuchEntry

Entry could not be found on the data

TooManyEntries

Exceeds limit on entrites for the given data type

NoSuchKey

Key does not exist

NotEnoughSpace

Node NotEnoughSpace error

DuplicateEntryKeys

Duplicate Entries in this push

InvalidOwners(PublicKey)

The list of owner keys is invalid

PolicyNotSet

No Policy has been set to the data

InvalidSuccessor(u64)

Invalid version for performing a given mutating operation. Contains the current data version.

InvalidOwnersSuccessor(u64)

Invalid version for performing a given mutating operation. Contains the current owners version.

OpNotCausallyReady

Invalid mutating operation as it causality dependency is currently not satisfied

InvalidPermissionsSuccessor(u64)

Invalid version for performing a given mutating operation. Contains the current permissions version.

InvalidOperation(String)

Invalid Operation such as a POST on ImmutableData

SigningKeyTypeMismatch

Mismatch between key type and signature type.

InvalidSignature

Failed signature validation.

DuplicateMessageId

Received a request with a duplicate MessageId

LossOfPrecision

While parsing, precision would be lost.

ExcessiveValue

The amount would exceed the maximum value for Token (u64::MAX).

TransactionIdExists

Transaction ID already exists.

InsufficientBalance

Insufficient coins.

NoSuchBalance

Inexistent balance.

NoSuchSender

Inexistent sender balance.

NoSuchRecipient

Inexistent recipient balance.

BalanceExists

Coin balance already exists.

ExceededSize

Expected data size exceeded.

CrdtMissingOpSignature

The operation has not been signed by an actor PK and so cannot be validated.

CrdtUnexpectedState

The data for a given policy could not be located, so CRDT operations cannot be applied.

EntryExists(u8)

Entry already exists. Contains the current entry Key.

PaymentFailed

Problem registering the payment at a node

FailedToDelete

Node failed to delete the requested data for some reason.

NodeWasNotRelocated

The node hasn’t left the section, and was not marked for relocation during reward operations

TargetSection(Error)

There was an error in the target section of a message. Probably related to section keys.

Trait Implementations

impl Clone for Error[src]

pub fn clone(&self) -> Error[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

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<'de> Deserialize<'de> for Error[src]

pub fn deserialize<__D>(
    __deserializer: __D
) -> Result<Error, <__D as Deserializer<'de>>::Error> where
    __D: Deserializer<'de>, 
[src]

Deserialize this value from the given Serde deserializer. 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]

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

Performs the conversion.

impl Hash for Error[src]

pub fn hash<__H>(&self, state: &mut __H) where
    __H: Hasher
[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

impl Ord for Error[src]

pub fn cmp(&self, other: &Error) -> Ordering[src]

This method returns an Ordering between self and other. Read more

#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]

Compares and returns the maximum of two values. Read more

#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]

Compares and returns the minimum of two values. Read more

#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]

Restrict a value to a certain interval. Read more

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 PartialOrd<Error> for Error[src]

pub fn partial_cmp(&self, other: &Error) -> Option<Ordering>[src]

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Serialize for Error[src]

pub fn serialize<__S>(
    &self,
    __serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
    __S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

impl Eq for Error[src]

impl StructuralEq for Error[src]

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

pub fn equivalent(&self, key: &K) -> bool[src]

Compare self to key and return true if they are equal.

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

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

pub fn clone_into(&self, target: &mut T)[src]

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

recently added

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

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

impl<A> Actor for A where
    A: Ord + Clone + Hash
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]