Enum hypercore::prelude::HypercoreError
source · pub enum HypercoreError {
BadArgument {
context: String,
},
NotWritable,
InvalidSignature {
context: String,
},
InvalidChecksum {
context: String,
},
EmptyStorage {
store: Store,
},
CorruptStorage {
store: Store,
context: Option<String>,
},
InvalidOperation {
context: String,
},
IO {
context: Option<String>,
source: Error,
},
}
Expand description
Common error type for the hypercore interface
Variants§
BadArgument
Bad argument
NotWritable
Not writable
InvalidSignature
Invalid signature
InvalidChecksum
Invalid checksum
EmptyStorage
Empty storage
CorruptStorage
Corrupt storage
InvalidOperation
Invalid operation
IO
Unexpected IO error occured
Trait Implementations§
source§impl Debug for HypercoreError
impl Debug for HypercoreError
source§impl Display for HypercoreError
impl Display for HypercoreError
source§impl Error for HypercoreError
impl Error for HypercoreError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<EncodingError> for HypercoreError
impl From<EncodingError> for HypercoreError
source§fn from(err: EncodingError) -> Self
fn from(err: EncodingError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for HypercoreError
impl Send for HypercoreError
impl Sync for HypercoreError
impl Unpin for HypercoreError
impl !UnwindSafe for HypercoreError
Blanket Implementations§
§impl<T> AsFail for Twhere
T: Fail,
impl<T> AsFail for Twhere T: Fail,
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
Mutably borrows from an owned value. Read more
§impl<E> Fail for Ewhere
E: Error + Send + Sync + 'static,
impl<E> Fail for Ewhere E: Error + Send + Sync + 'static,
§fn cause(&self) -> Option<&(dyn Fail + 'static)>
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>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the
Backtrace
carried by this failure, if it
carries one. Read more