Enum llvm_bitstream::error::Error[][src]

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

The underlying BitCursor returned an error that we couldn’t specialize.

Tuple Fields of Cursor

0: CursorError
BadContainer

We couldn’t parse the wrapper structure or other data that precedes the actual bitstream.

Tuple Fields of BadContainer

0: String
BadBlockInfoCode

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.

Tuple Fields of BadBlockInfoCode

0: TryFromPrimitiveError<BlockInfoCode>
BadAbbrevOpEnc

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.

Tuple Fields of BadAbbrevOpEnc

0: TryFromPrimitiveError<AbbrevOpEnc>
StreamParse

A generic error occurred while parsing the bitstream.

Tuple Fields of StreamParse

0: String
AbbrevParse

An error occurred while interpreting a DEFINE_ABBREV record.

Tuple Fields of AbbrevParse

0: String
BadAbbrev

An error occurred while mapping an abbreviated record back to its abbreviation definition.

Tuple Fields of BadAbbrev

0: u64
BadScope

An error occurred during block scope entrance or exit.

Tuple Fields of BadScope

0: String

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.