pub enum Error {
Show 18 variants
Network(String),
Storage(String),
Payment(String),
Protocol(String),
InvalidData(String),
Serialization(String),
Crypto(String),
Io(Error),
Config(String),
Timeout(String),
InsufficientPeers(String),
SignatureVerification(String),
Encryption(String),
AlreadyStored,
BadQuoteBinding {
peer_id: String,
detail: String,
},
InsufficientDiskSpace(String),
CostEstimationInconclusive(String),
PartialUpload {
stored: Vec<[u8; 32]>,
stored_count: usize,
failed: Vec<([u8; 32], String)>,
failed_count: usize,
total_chunks: usize,
reason: String,
},
}Expand description
Errors that can occur in data operations.
Variants§
Network(String)
Network operation failed.
Storage(String)
Storage operation failed.
Payment(String)
Payment operation failed.
Protocol(String)
Protocol error.
InvalidData(String)
Invalid data received.
Serialization(String)
Serialization error.
Crypto(String)
Cryptographic error.
Io(Error)
I/O error.
Config(String)
Configuration error.
Timeout(String)
Timeout waiting for a response.
InsufficientPeers(String)
Insufficient peers for the operation.
SignatureVerification(String)
BLS signature verification failed.
Encryption(String)
Self-encryption operation failed.
AlreadyStored
Data already exists on the network — no payment needed.
BadQuoteBinding
A peer’s quote pub_key does not BLAKE3-hash to the peer ID. The
storer would reject any ProofOfPayment containing this quote, so
the client drops the response before payment.
Fields
InsufficientDiskSpace(String)
Not enough disk space for the operation.
CostEstimationInconclusive(String)
Cost estimation could not reach a representative quote.
Returned by crate::data::Client::estimate_upload_cost when every
sampled chunk address reported AlreadyStored, so the network price
for the remainder of the file cannot be inferred from a sample.
The attached message describes how many addresses were tried.
PartialUpload
Upload partially succeeded – some chunks stored, some failed after retries.
The stored addresses can be used for progress tracking and resume.
Fields
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more