#[non_exhaustive]pub enum ParseError {
Show 13 variants
UnexpectedEof {
needed: usize,
available: usize,
},
InvalidVarInt,
IntegerTooLarge {
value: u64,
},
OversizedData {
size: usize,
max: usize,
},
UnsupportedVersion(i32),
MagicMismatch {
expected: [u8; 4],
got: [u8; 4],
},
InvalidSegwitFlag(u8),
InvalidInputCount,
TrailingBytes {
remaining: usize,
},
IncompleteTransactions {
expected: usize,
parsed: usize,
},
InvalidCoinbase,
InvalidCoinbaseCount {
count: usize,
},
Io {
message: String,
},
}Expand description
All errors that can occur during parsing.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnexpectedEof
Input ended before the structure was complete.
InvalidVarInt
A variable-length integer had an invalid encoding.
IntegerTooLarge
A length/value was valid as a u64 but does not fit into the platform usize.
OversizedData
A script or data field exceeded the allowed maximum size.
UnsupportedVersion(i32)
The block / transaction version is not supported by this parser.
MagicMismatch
The magic bytes at the start of a raw block did not match.
Fields
InvalidSegwitFlag(u8)
Segwit marker / flag bytes are invalid.
InvalidInputCount
Transaction input count was invalid (e.g., zero in legacy format).
TrailingBytes
Extra bytes remained after parsing a structure in strict mode.
IncompleteTransactions
Not all transactions declared in the block were parsed.
Fields
InvalidCoinbase
Coinbase transaction had a non-empty txid reference (must be all-zero).
InvalidCoinbaseCount
A block contained an unexpected number of coinbase transactions.
Io
An underlying I/O error occurred (only available with the std feature).
Trait Implementations§
Source§impl Clone for ParseError
impl Clone for ParseError
Source§fn clone(&self) -> ParseError
fn clone(&self) -> ParseError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ParseError
impl Debug for ParseError
Source§impl Display for ParseError
impl Display for ParseError
Source§impl Error for ParseError
Available on crate feature std only.
impl Error for ParseError
std only.1.30.0 · 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
Source§impl From<Error> for ParseError
Available on crate feature std only.
impl From<Error> for ParseError
std only.