Enum sn_client::Error[][src]

#[non_exhaustive]
pub enum Error {
Show variants AsymmetricDecipherFailure, SymmetricDecipherFailure, ReceivedUnexpectedData, ReceivedUnexpectedEvent, ElderQuery, ElderConnection, NotBootstrapped, InsufficientElderConnections(usize), ReceivingQuery, SendingQuery, QueryReceiverError, NoResponse, NoBlsSectionKey, NoSectionPrefixKnown, NoTransferValidationListener, UnexpectedMessageOnJoin(String), NotPublicPermissions, NotPrivatePermissions, NoElderListenerEstablished, IncorrectPermissions, UnexpectedTransferEvent(Event), UnexpectedQueryResponse(QueryResponse), UnexpectedHistoryResponse(QueryResponse), UnexpectedStoreCostResponse(QueryResponse), UnexpectedReplicaKeysResponse(PublicKey), NoTransferGenerated, NoTransferEventsForLocalActor, NotBuiltWithSimulatedPayouts, NetworkDataError(DtError), Transfer(TransfersError), 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
Expand description

Asymmetric Key Decryption Failed.

SymmetricDecipherFailure
Expand description

Symmetric Key Decryption Failed.

ReceivedUnexpectedData
Expand description

Received unexpected data.

ReceivedUnexpectedEvent
Expand description

Received unexpected event.

ElderQuery
Expand description

Could not query elder.

ElderConnection
Expand description

Could not connect to elder.

NotBootstrapped
Expand description

Client has not gone trhough qp2p bootstrap process yet

InsufficientElderConnections(usize)
Expand description

Could not connect to sufficient elder to retrieve reliable responses.

ReceivingQuery
Expand description

Could not query elder.

SendingQuery
Expand description

Could not send query to elder.

QueryReceiverError
Expand description

Could not query elder.

NoResponse
Expand description

Could not query elder.

NoBlsSectionKey
Expand description

No BLS section key known.

NoSectionPrefixKnown
Expand description

No section prefix found for session

NoTransferValidationListener
Expand description

No transfer validation listener .

UnexpectedMessageOnJoin(String)
Expand description

Unexpected message type receivied while joining.

NotPublicPermissions
Expand description

Permission set provided is not a PublicPermissionSet.

NotPrivatePermissions
Expand description

Permission set provided is not a PrivatePermissionSet.

NoElderListenerEstablished
Expand description

Did not receive an incoming connection listener from qp2p

IncorrectPermissions
Expand description

Incorrect user permissions were returned

UnexpectedTransferEvent(Event)
Expand description

Unexpcted transfer event received

UnexpectedQueryResponse(QueryResponse)
Expand description

Unexpcted response received

UnexpectedHistoryResponse(QueryResponse)
Expand description

Unexpected response received

UnexpectedStoreCostResponse(QueryResponse)
Expand description

Unexpected response received

UnexpectedReplicaKeysResponse(PublicKey)
Expand description

Unexpected response received

NoTransferGenerated
Expand description

Transfer actor failed generating a transfer

NoTransferEventsForLocalActor
Expand description

Transfer actor did not find any events to register locally

NotBuiltWithSimulatedPayouts
Expand description

Not in testnet “simulated payout” mode

NetworkDataError(DtError)
Expand description

Other sn_data_types errors

Transfer(TransfersError)
Expand description

Transfers errors

ErrorMessage
Expand description

Errors received from the network via sn_messaging

Show fields

Fields of ErrorMessage

source: ErrorMessage
Expand description

The source of an error message

msg_id: MessageId
Expand description

Message ID that was used to send the query

MessagingProtocol(MessagingError)
Expand description

Errors occurred when serialising or deserialising messages

SelfEncryption(SelfEncryptionError)
Expand description

self_enryption errors

ConfigError(Error)
Expand description

Other sn_data_types errors

IoError(Error)
Expand description

Io error.

QuicP2p(QuicP2pError)
Expand description

QuicP2p error.

Serialisation(Box<ErrorKind>)
Expand description

Bincode error

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<(CmdError, MessageId)> for Error[src]

fn from((error, msg_id): (CmdError, MessageId)) -> Self[src]

Performs the conversion.

impl From<(Error, MessageId)> for Error[src]

fn from((source, msg_id): (ErrorMessage, MessageId)) -> Self[src]

Performs the conversion.

impl From<Box<ErrorKind, Global>> for Error[src]

fn from(source: Box<ErrorKind>) -> Self[src]

Performs the conversion.

impl From<Error> for Error[src]

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

Performs the conversion.

impl From<Error> for Error[src]

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

Performs the conversion.

impl From<Error> for Error[src]

fn from(source: MessagingError) -> 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: QuicP2pError) -> Self[src]

Performs the conversion.

impl From<SelfEncryptionError> for Error[src]

fn from(source: SelfEncryptionError) -> 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