pub enum Error {
IOErr(String, ErrorKind),
UnexpectedData {
expected: Vec<u8>,
received: Vec<u8>,
},
CorruptedData,
CountError,
TooLargeReadErr,
HexError(String),
SortError,
DuplicateError,
InvalidBlockVersion,
UnsupportedProtocolVersion,
}
Expand description
Possible errors deriving from serializing or deserializing.
Variants§
IOErr(String, ErrorKind)
Wraps an io error produced when reading or writing
UnexpectedData
Expected a given value that wasn’t found
CorruptedData
Data wasn’t in a consumable format
CountError
Incorrect number of elements (when deserializing a vec via read_multi say).
TooLargeReadErr
When asked to read too much data
HexError(String)
Error from from_hex deserialization
SortError
Inputs/outputs/kernels must be sorted lexicographically.
DuplicateError
Inputs/outputs/kernels must be unique.
InvalidBlockVersion
Block header version (hard-fork schedule).
UnsupportedProtocolVersion
Unsupported protocol version
Trait Implementations§
source§impl<'de> Deserialize<'de> for Error
impl<'de> Deserialize<'de> for Error
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Error for Error
impl Error for Error
source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl PartialEq for Error
impl PartialEq for Error
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin 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
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.