Enum safe_network::client::Error
source · [−]#[non_exhaustive]
pub enum Error {
Show 32 variants
NetworkContact,
GenesisKeyMismatch,
CouldNotReadHomeDir,
CouldNotCreateSafeDir,
ReceivedUnexpectedEvent,
NoNetworkKnowledge,
IncomingMessages,
InsufficientElderConnections {
connections: usize,
required: usize,
},
InsufficientElderKnowledge {
connections: usize,
required: usize,
section_pk: PublicKey,
},
PeerConnection(SocketAddr),
EmptyFileProvided,
TooSmallForSelfEncryption,
SmallFilePaddingNeeded,
TooLargeAsSmallFile,
QueryTimedOut,
NoEncryptionObject,
NoResponse,
UnknownOperationId,
UnexpectedQueryResponse(QueryResponse),
NetworkDataError(DtError),
ErrorMessage {
source: ErrorMessage,
op_id: OperationId,
},
MessagingProtocol(MessagingError),
SelfEncryption(Error),
ConfigError(Error),
IoError(Error),
EndpointSetup(ClientEndpointError),
QuicP2p(RpcError),
QuicP2pConnection(ConnectionError),
QuicP2pSend(SendError),
Serialisation(Box<ErrorKind>),
NotEnoughChunksRetrieved {
expected: usize,
retrieved: usize,
},
NotAllDataWasChunked {
expected: usize,
chunked: usize,
},
}
Expand description
Client Errors
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
NetworkContact
Initial network contact failed
GenesisKeyMismatch
Genesis Key from the config and the PrefixMap mismatch
CouldNotReadHomeDir
Error reading home dir for client
CouldNotCreateSafeDir
Error creating root dir for client
ReceivedUnexpectedEvent
Received unexpected event.
NoNetworkKnowledge
Client has not gone through qp2p bootstrap process yet
IncomingMessages
qp2p’s IncomingMessages errores
InsufficientElderConnections
Fields
connections: usize
Number of existing connections to Elders
required: usize
Minimum number of connections to Elders required for the operation
Could not connect to sufficient elder to retrieve reliable responses.
InsufficientElderKnowledge
Fields
connections: usize
Number of existing connections to Elders
required: usize
Minimum number of connections to Elders required for the operation
section_pk: PublicKey
Public key of the target section
Did not know of sufficient elders in the desired section to get supermajority of repsonses.
PeerConnection(SocketAddr)
Peer connection retrieval failed
EmptyFileProvided
Cannot store empty file..
TooSmallForSelfEncryption
Not enough bytes for self-encryption.
SmallFilePaddingNeeded
Encryption oversized the SmallFile, so it cannot be stored as a SmallFile and be encrypted
TooLargeAsSmallFile
The provided bytes is too large to store as a SmallFile
.
QueryTimedOut
No query response before timeout
NoEncryptionObject
Could not get an encryption object.
NoResponse
Could not query elder.
UnknownOperationId
No operation Id could be found
UnexpectedQueryResponse(QueryResponse)
Unexpected response received
NetworkDataError(DtError)
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)
Errors occurred when serialising or deserialising messages
SelfEncryption(Error)
self_enryption errors
ConfigError(Error)
Other types errors
IoError(Error)
Io error.
EndpointSetup(ClientEndpointError)
Endpoint setup error.
QuicP2p(RpcError)
QuicP2p error.
QuicP2pConnection(ConnectionError)
QuicP2p Connection error.
QuicP2pSend(SendError)
QuicP2p Send error.
Serialisation(Box<ErrorKind>)
Bincode error
NotEnoughChunksRetrieved
Fields
expected: usize
Number of Chunks expected to be retrieved
retrieved: usize
Number of Chunks retrieved
Could not retrieve all chunks required to decrypt the data. (expected, error)
NotAllDataWasChunked
Fields
expected: usize
Number of Chunks expected to be generated
chunked: usize
Number of Chunks generated
Could not chunk all the data required to encrypt the data. (Expected, Actual)
Trait Implementations
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
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