Enum safe_network::node::Error[][src]

#[non_exhaustive]
pub enum Error {
Show 48 variants NotAnAdult, NotAnElder, NoAdults(Prefix), Database(Error), NetworkFull, NoSourceMessageForProcessingError, UnexpectedProcessMsg, NoSectionFunds, NoSectionMetaData, NoImmutableChunks, NodeChurningFunds, ChurnSignError, NotInGenesis, NoDestinationName, NodeAlreadyActive, NoSectionPublicKey, UnknownSectionKey(PublicKey), CannotDirectMessage, CannotUpdateProcessErrorNode, ProvidedPkIsNotBlsShare, ProvidedPkIsNotBls, NoSectionPublicKeySet, NoSectionPublicKeyKnown(XorName), InvalidRewardStage, NodeNotFoundForReward, NoSuchData(DataAddress), NotChurningFunds, TempDirCreationFailed(String), CouldNotCombineSignatures, DataExists, Io(Error), JsonSerialisation(Error), Bincode(Error), DataMsg(Error), ProcessingError(ProcessingError), Message(Error), NetworkData(Error), Routing(Error), InvalidMessage(MessageIdString), InvalidOwner(PublicKey), InvalidOperation(String), NoErrorMapping(String), Logic(String), JoinTimeout, Configuration(String), UnableToSend(WireMsg), UnableToCreateRegisterDb, Sled(Error),
}
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)

Not enough in the section to perform Chunk operation

Database(Error)

Database error.

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

NoSuchData(DataAddress)

Key, Value pair not found.

NotChurningFunds

Unable to process fund churn message.

TempDirCreationFailed(String)

Creating temp directory failed.

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.

DataMsg(Error)

Network message error.

ProcessingError(ProcessingError)

Network processing error message.

Message(Error)

Network message error.

NetworkData(Error)

NetworkData error.

Routing(Error)

Routing error.

InvalidMessage(MessageIdString)

Message is invalid.

InvalidOwner(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.

JoinTimeout

Timeout when trying to join the network

Configuration(String)

Configuration error.

UnableToSend(WireMsg)

Failed to send message to connection.

UnableToCreateRegisterDb

Sled Failed to create the database

Sled(Error)

Sled error.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

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

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

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

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

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

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

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

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

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more