[][src]Enum safe_nd::Error

pub enum Error {
    AccessDenied,
    NoSuchLoginPacket,
    LoginPacketExists,
    NoSuchData,
    DataExists,
    NoSuchEntry,
    TooManyEntries,
    InvalidEntryActions(BTreeMap<Vec<u8>, EntryError>),
    NoSuchKey,
    KeysExist(ADataEntries),
    DuplicateEntryKeys,
    InvalidOwners,
    InvalidSuccessor(u64),
    InvalidOwnersSuccessor(u64),
    InvalidPermissionsSuccessor(u64),
    InvalidPermissions,
    InvalidOperation,
    SigningKeyTypeMismatch,
    InvalidSignature,
    DuplicateMessageId,
    NetworkOther(String),
    LossOfPrecision,
    ExcessiveValue,
    FailedToParse(String),
    TransactionIdExists,
    InsufficientBalance,
    NoSuchBalance,
    BalanceExists,
    ExceededSize,
}

Main error type for the crate.

Variants

AccessDenied

Access is denied for a given requester

NoSuchLoginPacket

Login packet does not exist

LoginPacketExists

Attempt to store a login packet at an already occupied address

NoSuchData

Requested data not found

DataExists

Attempt to create a mutable data when data with such a name already exists

NoSuchEntry

Requested entry not found

TooManyEntries

Exceeded a limit on a number of entries

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

Some entry actions are not valid.

NoSuchKey

Key does not exist

KeysExist(ADataEntries)

The key(s) of the entry or entries contained in this error already exist

DuplicateEntryKeys

Duplicate Entries in this push

InvalidOwners

The list of owner keys is invalid

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.

InvalidPermissionsSuccessor(u64)

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

InvalidPermissions

The list of permissions is invalid.

InvalidOperation

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

NetworkOther(String)

Network error occurring at Vault level which has no bearing on clients, e.g. serialisation failure or database failure

LossOfPrecision

While parsing, precision would be lost.

ExcessiveValue

The coin amount would exceed the maximum value for Coins.

FailedToParse(String)

Failed to parse the string as Coins.

TransactionIdExists

Transaction ID already exists.

InsufficientBalance

Insufficient coins.

NoSuchBalance

Inexistent balance.

BalanceExists

Coin balance already exists.

ExceededSize

Expected data size exceeded.

Trait Implementations

impl Clone for Error[src]

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

Performs copy-assignment from source. Read more

impl Ord for Error[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

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

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

Restrict a value to a certain interval. Read more

impl<T: Into<String>> From<T> for Error[src]

impl PartialOrd<Error> for Error[src]

impl PartialEq<Error> for Error[src]

impl Eq for Error[src]

impl Display for Error[src]

impl Debug for Error[src]

impl Hash for Error[src]

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

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

Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

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

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

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

impl Serialize for Error[src]

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

Auto Trait Implementations

impl Sync for Error

impl Send for Error

impl Unpin for Error

impl RefUnwindSafe for Error

impl UnwindSafe for Error

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

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

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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

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

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> AsFail for T where
    T: Fail, 

impl<T> Same<T> for T

type Output = T

Should always be Self