Enum sn_node::Error[][src]

#[non_exhaustive]
pub enum Error {
Show variants NotAnAdult, NotAnElder, NoAdults(Prefix), NotEnoughSpace, NetworkFull, NoSourceMessageForProcessingError, UnexpectedProcessMsg, NoSectionFunds, NoSectionMetaData, NoImmutableChunks, NodeChurningFunds, ChurnSignError, NotInGenesis, NoDestinationName, NodeAlreadyActive, NoSectionPublicKey, UnknownSectionKey(PublicKey), CannotDirectMessage, CannotUpdateProcessErrorNode, ProvidedPkIsNotBlsShare, ProvidedPkIsNotBls, NoSectionPublicKeySet, NoSectionPublicKeyKnown(XorName), InvalidRewardStage, NodeNotFoundForReward, NoSuchChunk(DataAddress), NotChurningFunds, TempDirCreationFailed(String), NoStoreId, CouldNotCombineSignatures, DataExists, Io(Error), JsonSerialisation(Error), Bincode(Error), ClientMsg(Error), ProcessingError(ProcessingError), Message(Error), PickleDb(Error), NetworkData(Error), Transfer(Error), Routing(Error), TransferAlreadyRegistered, InvalidSignedTransfer(Dot<PublicKey>), InvalidPropagatedTransfer(CreditAgreementProof), InvalidMessage(MessageIdString), InvalidOwners(PublicKey), InvalidOperation(String), NoErrorMapping(String), Logic(String), Configuration(String), UnableToSend(MsgType),
}
Expand description

Node error variants.

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.
NotAnAdult

Attempted to perform an operation meant only for Adults when we are not one.

NotAnElder

Attempted to perform an operation meant only for Elders when we are not one.

NoAdults(Prefix)

No Adults in the section to perform Chunk operation

NotEnoughSpace

Not enough space in ChunkStore to perform put.

NetworkFull

Not enough storage available on the network.

NoSourceMessageForProcessingError

No source message provided for ProcessingError

UnexpectedProcessMsg

Unexpected Process msg. A ProcessingError was expected here…

NoSectionFunds

Node does not manage any section funds.

NoSectionMetaData

Node does not manage any metadata, so is likely not a fully prepared elder yet.

NoImmutableChunks

Node does not manage any immutable chunks.

NodeChurningFunds

Node is currently churning so cannot perform the request.

ChurnSignError

Node is currently churning, but failed to sign a message.

NotInGenesis

Genesis node not in genesis stage.

NoDestinationName

Target xorname could not be determined from DstLocation

NodeAlreadyActive

Failed to activate a node, due to it being active already

NoSectionPublicKey

Not Section PublicKey.

UnknownSectionKey(PublicKey)

Unknown as a Section PublicKey.

CannotDirectMessage

Nodes cannot send direct messages

CannotUpdateProcessErrorNode

Node cannot be updated, message cannot be resent

ProvidedPkIsNotBlsShare

Not a Section PublicKeyShare.

ProvidedPkIsNotBls

Not a Section PublicKey.

NoSectionPublicKeySet

Not Section PublicKeySet.

NoSectionPublicKeyKnown(XorName)

Not Section PublicKey.

InvalidRewardStage

Unable to parse reward proposal.

NodeNotFoundForReward

Node not found for rewarding

NoSuchChunk(DataAddress)

Key, Value pair not found in ChunkStore.

NotChurningFunds

Unable to process fund churn message.

TempDirCreationFailed(String)

Creating temp directory failed.

NoStoreId

Chunk Store Id could not be found

CouldNotCombineSignatures

Threshold crypto combine signatures error

DataExists

Chunk already exists for this node

Io(Error)

I/O error.

JsonSerialisation(Error)

JSON serialisation error.

Bincode(Error)

Bincode error.

ClientMsg(Error)

Network message error.

ProcessingError(ProcessingError)

Network processing error message.

Message(Error)

Network message error.

PickleDb(Error)

PickleDb error.

NetworkData(Error)

NetworkData error.

Transfer(Error)

sn_transfers error.

Routing(Error)

Routing error.

TransferAlreadyRegistered

Transfer has already been registered

InvalidSignedTransfer(Dot<PublicKey>)

Transfer message is invalid.

InvalidPropagatedTransfer(CreditAgreementProof)

Transfer message is invalid.

InvalidMessage(MessageIdString)

Message is invalid.

InvalidOwners(PublicKey)

Data owner provided is invalid.

InvalidOperation(String)

Operation is invalid, eg signing validation

NoErrorMapping(String)

No mapping to sn_messages::Error could be found. Either we need a new error there, or we need to handle or convert this error before sending it as a message

Logic(String)

Logic error.

Configuration(String)

Configuration error.

UnableToSend(MsgType)

Failed to send message to connection.

Trait Implementations

impl Debug for Error[src]

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

Formats the value using the given formatter. Read more

impl Display for Error[src]

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

Formats the value using the given formatter. Read more

impl Error for Error[src]

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<Box<ErrorKind, Global>> for Error[src]

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

Performs the conversion.

impl From<Error> for Error[src]

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

Performs the conversion.

impl From<Error> for Error[src]

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

Performs the conversion.

impl From<Error> for Error[src]

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

Performs the conversion.

impl From<Error> for Error[src]

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

Performs the conversion.

impl From<Error> for Error[src]

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

Performs the conversion.

impl From<Error> for Error[src]

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

Performs the conversion.

impl From<Error> for Error[src]

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

Performs the conversion.

impl From<Error> for Error[src]

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

Performs the conversion.

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