[][src]Enum sn_data_types::Error

#[non_exhaustive]pub enum Error {
    AccessDenied(PublicKey),
    Serialisation(String),
    EntryExists(u8),
    InvalidEntryActions(BTreeMap<Vec<u8>, Error>),
    NoSuchEntry,
    NoSuchKey,
    InvalidOwners,
    PolicyNotSet,
    InvalidSuccessor(u64),
    OpNotCausallyReady,
    InvalidOperation,
    SigningKeyTypeMismatch,
    InvalidSignature,
    LossOfPrecision,
    ExcessiveValue,
    FailedToParse(String),
    NoSuchRecipient,
    ExceededSize,
    CrdtMissingOpSignature,
    CrdtUnexpectedState,
}

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.
AccessDenied(PublicKey)

Access denied for supplied PublicKey

Serialisation(String)

Serialization error

EntryExists(u8)

Entry already exists. Contains the current entry Key.

InvalidEntryActions(BTreeMap<Vec<u8>, Error>)

Supplied actions are not valid

NoSuchEntry

Entry could not be found on the data

NoSuchKey

Key does not exist

InvalidOwners

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.

OpNotCausallyReady

Invalid mutating operation as it causality dependency is currently not satisfied

InvalidOperation

Invalid Operation such as a POST on ImmutableData

SigningKeyTypeMismatch

Mismatch between key type and signature type.

InvalidSignature

Failed signature validation.

LossOfPrecision

While parsing, precision would be lost.

ExcessiveValue

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

FailedToParse(String)

Failed to parse a string.

NoSuchRecipient

Inexistent recipient balance.

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.

Trait Implementations

impl Clone for Error[src]

impl Debug for Error[src]

impl<'de> Deserialize<'de> for Error[src]

impl Display for Error[src]

impl Eq for Error[src]

impl Error for Error[src]

impl Hash for Error[src]

impl Ord for Error[src]

impl PartialEq<Error> for Error[src]

impl PartialOrd<Error> for Error[src]

impl Serialize for Error[src]

impl StructuralEq for Error[src]

impl StructuralPartialEq for Error[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

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

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

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

impl<T> Member for T where
    T: Clone + Eq + Hash
[src]

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.

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

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.

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.

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