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

#[non_exhaustive]
pub enum Error {
Show 40 variants Aggregation(String), AsymmetricDecipherFailure, SymmetricDecipherFailure, ReceivedUnexpectedData, ReceivedUnexpectedEvent, ElderQuery, ElderConnection, NoNetworkKnowledge, IncomingMessages, InsufficientElderConnections(usizeusize), ReceivingQuery, SendingQuery, QueryTimedOut, 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(RpcError), Serialisation(Box<ErrorKind>), Sled(Error), Database(Error), Generic(String), NotEnoughChunks(usizeusize), NotAllDataWasChunked(usizeusize), InvalidPositionOrLength(String),
}
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)

Tuple Fields

0: String

Signature Aggregation Error

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.

NoNetworkKnowledge

Client has not gone through qp2p bootstrap process yet

IncomingMessages

qp2p’s IncomingMessages errores

InsufficientElderConnections(usizeusize)

Tuple Fields

0: usize
1: usize

Could not connect to sufficient elder to retrieve reliable responses.

ReceivingQuery

Could not query elder.

SendingQuery

Could not send query to elder.

QueryTimedOut

No query response before timeout

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)

Tuple Fields

0: String

Unexpected message type received 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

UnknownOperationId

No operation Id could be found

UnexpectedQueryResponse(QueryResponse)

Tuple Fields

Unexpected response received

NotBuiltWithSimulatedPayouts

Not in testnet “simulated payout” mode

NetworkDataError(DtError)

Tuple Fields

Other types errors

ErrorMessage

Fields

source: ErrorMessage

The source of an error message

op_id: OperationId

operation ID that was used to send the query

Errors received from the network via sn_messaging

MessagingProtocol(MessagingError)

Tuple Fields

Errors occurred when serialising or deserialising messages

SelfEncryption(Error)

Tuple Fields

0: Error

self_enryption errors

ConfigError(Error)

Tuple Fields

0: Error

Other types errors

IoError(Error)

Tuple Fields

0: Error

Io error.

EndpointSetup(ClientEndpointError)

Tuple Fields

Endpoint setup error.

QuicP2p(RpcError)

Tuple Fields

QuicP2p error.

Serialisation(Box<ErrorKind>)

Tuple Fields

Bincode error

Sled(Error)

Tuple Fields

0: Error

Sled error.

Database(Error)

Tuple Fields

0: Error

Database error.

Generic(String)

Tuple Fields

0: String

Generic Error

NotEnoughChunks(usizeusize)

Tuple Fields

0: usize
1: usize

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

NotAllDataWasChunked(usizeusize)

Tuple Fields

0: usize
1: usize

Could not chunk all the data required to encrypt the data. (Expected, Actual)

InvalidPositionOrLength(String)

Tuple Fields

0: String

InvalidPositionOrLength

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.

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

The type of the wrapped error after instrumentation

Instrument an Error by bundling it with a SpanTrace Read more

Performs the conversion.

Set the foreground color generically Read more

Set the background color generically. Read more

Change the foreground color to black

Change the foreground color to black

Change the foreground color to red

Change the foreground color to red

Change the foreground color to green

Change the foreground color to green

Change the foreground color to yellow

Change the foreground color to yellow

Change the foreground color to blue

Change the foreground color to blue

Change the foreground color to magenta

Change the foreground color to magenta

Change the foreground color to purple

Change the foreground color to purple

Change the foreground color to cyan

Change the foreground color to cyan

Change the foreground color to white

Change the foreground color to white

Change the foreground color to bright black

Change the foreground color to bright black

Change the foreground color to bright red

Change the foreground color to bright red

Change the foreground color to bright green

Change the foreground color to bright green

Change the foreground color to bright yellow

Change the foreground color to bright yellow

Change the foreground color to bright blue

Change the foreground color to bright blue

Change the foreground color to bright magenta

Change the foreground color to bright magenta

Change the foreground color to bright purple

Change the foreground color to bright purple

Change the foreground color to bright cyan

Change the foreground color to bright cyan

Change the foreground color to bright white

Change the foreground color to bright white

Make the text bold

Make the text dim

Make the text italicized

Make the text italicized

Make the text blink

Make the text blink (but fast!)

Swap the foreground and background colors

Hide the text

Cross out the text

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either OwoColorize::fg or a color-specific method, such as OwoColorize::green, Read more

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either OwoColorize::bg or a color-specific method, such as OwoColorize::on_yellow, Read more

Sets the foreground color to an RGB value.

Sets the background color to an RGB value.

Apply a runtime-determined style

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

Add a header to a Section and indent the body Read more

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