pub enum Error {
Show 13 variants
IOErr(String, ErrorKind),
SecpError(Error),
UnexpectedData {
expected: Vec<u8>,
received: Vec<u8>,
},
CorruptedData(String),
CountError(String),
TooLargeWriteErr(String),
TooLargeReadErr(String),
HexError(String),
SortError,
DuplicateError,
InvalidBlockVersion(String),
Utf8Conversion(String),
UnsupportedProtocolVersion(String),
}Expand description
Possible errors deriving from serializing or deserializing.
Variants§
IOErr(String, ErrorKind)
Wraps an io error produced when reading or writing
SecpError(Error)
Wraps secp256k1 error
UnexpectedData
Expected a given value that wasn’t found
CorruptedData(String)
Data wasn’t in a consumable format
CountError(String)
Incorrect number of elements (when deserializing a vec via read_multi say).
TooLargeWriteErr(String)
When asked to read too much data
TooLargeReadErr(String)
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(String)
Block header version (hard-fork schedule).
Utf8Conversion(String)
utf8 conversion failed
UnsupportedProtocolVersion(String)
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
impl Eq for Error
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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()
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 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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DebugAny for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.