Enum safe_network::client::Error[][src]

#[non_exhaustive]
pub enum Error {
Show 29 variants AsymmetricDecipherFailure, SymmetricDecipherFailure, ReceivedUnexpectedData, ReceivedUnexpectedEvent, ElderQuery, ElderConnection, NotBootstrapped, InsufficientElderConnections(usize), ReceivingQuery, SendingQuery, QueryReceiverError, NoResponse, NoBlsSectionKey, NoSectionPrefixKnown, UnexpectedMessageOnJoin(String), NotPublicPermissions, NotPrivatePermissions, NoElderListenerEstablished, IncorrectPermissions, UnexpectedQueryResponse(QueryResponse), NotBuiltWithSimulatedPayouts, NetworkDataError(DtError), ErrorMessage { source: ErrorMessage, msg_id: MessageId, }, MessagingProtocol(MessagingError), SelfEncryption(SelfEncryptionError), ConfigError(Error), IoError(Error), QuicP2p(QuicP2pError), Serialisation(Box<ErrorKind>),
}
Expand description

Client Errors

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

Asymmetric Key Decryption Failed.

SymmetricDecipherFailure

Symmetric Key Decryption Failed.

ReceivedUnexpectedData

Received unexpected data.

ReceivedUnexpectedEvent

Received unexpected event.

ElderQuery

Could not query elder.

ElderConnection

Could not connect to elder.

NotBootstrapped

Client has not gone trhough qp2p bootstrap process yet

InsufficientElderConnections(usize)

Could not connect to sufficient elder to retrieve reliable responses.

ReceivingQuery

Could not query elder.

SendingQuery

Could not send query to elder.

QueryReceiverError

Could not query elder.

NoResponse

Could not query elder.

NoBlsSectionKey

No BLS section key known.

NoSectionPrefixKnown

No section prefix found for session

UnexpectedMessageOnJoin(String)

Unexpected message type receivied while joining.

NotPublicPermissions

Permission set provided is not a PublicPermissionSet.

NotPrivatePermissions

Permission set provided is not a PrivatePermissionSet.

NoElderListenerEstablished

Did not receive an incoming connection listener from qp2p

IncorrectPermissions

Incorrect user permissions were returned

UnexpectedQueryResponse(QueryResponse)

Unexpected response received

NotBuiltWithSimulatedPayouts

Not in testnet “simulated payout” mode

NetworkDataError(DtError)

Other types errors

ErrorMessage

Errors received from the network via sn_messaging

Fields of ErrorMessage

source: ErrorMessage

The source of an error message

msg_id: MessageId

Message ID that was used to send the query

MessagingProtocol(MessagingError)

Errors occurred when serialising or deserialising messages

SelfEncryption(SelfEncryptionError)

self_enryption errors

ConfigError(Error)

Other types errors

IoError(Error)

Io error.

QuicP2p(QuicP2pError)

QuicP2p error.

Serialisation(Box<ErrorKind>)

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

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