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>),
}

Client Errors

Variants (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

NoTransferValidationListener

No transfer validation listener .

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

UnexpectedTransferEvent(Event)

Unexpcted transfer event received

UnexpectedQueryResponse(QueryResponse)

Unexpcted response received

UnexpectedHistoryResponse(QueryResponse)

Unexpected response received

UnexpectedStoreCostResponse(QueryResponse)

Unexpected response received

UnexpectedReplicaKeysResponse(PublicKey)

Unexpected response received

NoTransferGenerated

Transfer actor failed generating a transfer

NoTransferEventsForLocalActor

Transfer actor did not find any events to register locally

NotBuiltWithSimulatedPayouts

Not in testnet “simulated payout” mode

NetworkDataError(DtError)

Other sn_data_types errors

Transfer(TransfersError)

Transfers errors

ErrorMessage

Errors received from the network via sn_messaging

Show fields

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 sn_data_types errors

IoError(Error)

Io error.

QuicP2p(QuicP2pError)

QuicP2p error.

Serialisation(Box<ErrorKind>)

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