Enum llvm_bitstream::error::Error
source · [−]pub enum Error {
Exhausted,
Cursor(CursorError),
BadContainer(String),
BadBlockInfoCode(TryFromPrimitiveError<BlockInfoCode>),
BadAbbrevOpEnc(TryFromPrimitiveError<AbbrevOpEnc>),
StreamParse(String),
AbbrevParse(String),
BadAbbrev(u64),
BadScope(String),
}
Expand description
All possible errors that can occur while parsing a bitstream.
Variants
Exhausted
The underlying bitstream has no more data to parse.
Cursor(CursorError)
The underlying BitCursor
returned an error
that we couldn’t specialize.
BadContainer(String)
We couldn’t parse the wrapper structure or other data that precedes the actual bitstream.
BadBlockInfoCode(TryFromPrimitiveError<BlockInfoCode>)
A record in the BLOCKINFO
block has a code that we don’t know.
BLOCKINFO
must be fully interpreted in order to correctly parse the remainder of
the bitstream, so this is a hard error.
BadAbbrevOpEnc(TryFromPrimitiveError<AbbrevOpEnc>)
An operand in a DEFINE_ABBREV
definition has a code that we don’t know.
This indicates either a malformed bitstream or a new operand format that
we don’t yet support, so it’s a hard error.
StreamParse(String)
A generic error occurred while parsing the bitstream.
AbbrevParse(String)
An error occurred while interpreting a DEFINE_ABBREV
record.
BadAbbrev(u64)
An error occurred while mapping an abbreviated record back to its abbreviation definition.
BadScope(String)
An error occurred during block scope entrance or exit.
Trait Implementations
Performs the conversion.
Performs the conversion.