#[non_exhaustive]pub enum DeserializeError {
InvalidMagic,
InvalidSeparator,
NoMorePairs,
DecodeGlobal(DecodeError),
DecodeInput(DecodeError),
DecodeOutput(DecodeError),
}Expand description
Error while deserializing a PSBT.
This error is returned when deserializing a complete PSBT, not for deserializing parts of it or individual data types.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidMagic
Invalid magic bytes, expected the ASCII for “psbt” serialized in most significant byte order.
InvalidSeparator
The separator for a PSBT must be 0xff.
NoMorePairs
Signals that there are no more key-value pairs in a key-value map.
DecodeGlobal(DecodeError)
Error decoding the global map.
DecodeInput(DecodeError)
Error decoding an input map.
DecodeOutput(DecodeError)
Error decoding an output map.
Trait Implementations§
Source§impl Debug for DeserializeError
impl Debug for DeserializeError
Source§impl Display for DeserializeError
impl Display for DeserializeError
Source§impl Error for DeserializeError
Available on crate feature std only.
impl Error for DeserializeError
Available on crate feature
std only.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()
Source§impl From<DecodeError> for DeserializeError
impl From<DecodeError> for DeserializeError
Source§fn from(e: DecodeError) -> Self
fn from(e: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<DecodeError> for DeserializeError
impl From<DecodeError> for DeserializeError
Source§fn from(e: DecodeError) -> Self
fn from(e: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<DecodeError> for DeserializeError
impl From<DecodeError> for DeserializeError
Source§fn from(e: DecodeError) -> Self
fn from(e: DecodeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DeserializeError
impl !RefUnwindSafe for DeserializeError
impl Send for DeserializeError
impl Sync for DeserializeError
impl Unpin for DeserializeError
impl UnsafeUnpin for DeserializeError
impl !UnwindSafe for DeserializeError
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