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

#[non_exhaustive]
pub enum Error {
Show 37 variants Aggregation(String), AsymmetricDecipherFailure, SymmetricDecipherFailure, ReceivedUnexpectedData, ReceivedUnexpectedEvent, ElderQuery, ElderConnection, NotBootstrapped, InsufficientElderConnections(usize), ReceivingQuery, SendingQuery, QueryReceiverError, NoResponse, NoBlsSectionKey, NoSectionPrefixKnown, UnexpectedMessageOnJoin(String), NotPublicPermissions, NotPrivatePermissions, NoElderListenerEstablished, IncorrectPermissions, UnknownOperationId, UnexpectedQueryResponse(QueryResponse), NotBuiltWithSimulatedPayouts, NetworkDataError(DtError), ErrorMessage { source: ErrorMessage, op_id: OperationId, }, MessagingProtocol(MessagingError), SelfEncryption(Error), ConfigError(Error), IoError(Error), EndpointSetup(ClientEndpointError), QuicP2p(SendError), Serialisation(Box<ErrorKind>), Sled(Error), Database(Error), Generic(String), BootstrapToPeerFailed(SocketAddr), NotEnoughChunks(usizeusize),
}
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.
Aggregation(String)

Signature Aggregation Error

Tuple Fields of Aggregation

0: String
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 through qp2p bootstrap process yet

InsufficientElderConnections(usize)

Could not connect to sufficient elder to retrieve reliable responses.

Tuple Fields of InsufficientElderConnections

0: usize
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 received while joining.

Tuple Fields of UnexpectedMessageOnJoin

0: String
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

UnknownOperationId

No operation Id could be found

UnexpectedQueryResponse(QueryResponse)

Unexpected response received

Tuple Fields of UnexpectedQueryResponse

0: QueryResponse
NotBuiltWithSimulatedPayouts

Not in testnet “simulated payout” mode

NetworkDataError(DtError)

Other types errors

Tuple Fields of NetworkDataError

0: DtError
ErrorMessage

Errors received from the network via sn_messaging

Fields of ErrorMessage

source: ErrorMessage

The source of an error message

op_id: OperationId

operation ID that was used to send the query

MessagingProtocol(MessagingError)

Errors occurred when serialising or deserialising messages

Tuple Fields of MessagingProtocol

0: MessagingError
SelfEncryption(Error)

self_enryption errors

Tuple Fields of SelfEncryption

0: Error
ConfigError(Error)

Other types errors

Tuple Fields of ConfigError

0: Error
IoError(Error)

Io error.

Tuple Fields of IoError

0: Error
EndpointSetup(ClientEndpointError)

Endpoint setup error.

Tuple Fields of EndpointSetup

0: ClientEndpointError
QuicP2p(SendError)

QuicP2p error.

Tuple Fields of QuicP2p

0: SendError
Serialisation(Box<ErrorKind>)

Bincode error

Tuple Fields of Serialisation

0: Box<ErrorKind>
Sled(Error)

Sled error.

Tuple Fields of Sled

0: Error
Database(Error)

Database error.

Tuple Fields of Database

0: Error
Generic(String)

Generic Error

Tuple Fields of Generic

0: String
BootstrapToPeerFailed(SocketAddr)

Could not bootstrap to an unresponsive peer

Tuple Fields of BootstrapToPeerFailed

0: SocketAddr
NotEnoughChunks(usizeusize)

Could not retrieve all chunks required to decrypt the data. (Expected, Actual)

Tuple Fields of NotEnoughChunks

0: usize1: usize

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.

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

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