pub enum DecodingError {
Show 21 variants
InvalidMagic,
InvalidBinaryFormatVersion,
Eof,
MalformedUtf8(Utf8Error),
MalformedSectionTypeDiscriminator(u8),
MalformedNumTypeDiscriminator(u8),
MalformedVecTypeDiscriminator(u8),
MalformedFuncTypeDiscriminator(u8),
MalformedRefTypeDiscriminator(u8),
MalformedValType,
MalformedExportDescDiscriminator(u8),
MalformedImportDescDiscriminator(u8),
MalformedLimitsDiscriminator(u8),
MalformedLimitsMinLargerThanMax {
min: u32,
max: u32,
},
MalformedMutDiscriminator(u8),
MalformedBlockTypeTypeIdx(i64),
MalformedVariableLengthInteger,
MalformedElemKindDiscriminator(u8),
I33IsNegative,
TooManyLocals(u64),
MemoryTooLarge,
}Variants§
InvalidMagic
The magic number at the start of the Wasm bytecode is invalid.
InvalidBinaryFormatVersion
The binary format version at the start of the Wasm bytecode is invalid.
Eof
The end of the binary file was reached unexpectedly.
MalformedUtf8(Utf8Error)
A UTF-8 string is malformed.
MalformedSectionTypeDiscriminator(u8)
The type of a section is malformed.
MalformedNumTypeDiscriminator(u8)
The discriminator of a number type is malformed.
MalformedVecTypeDiscriminator(u8)
The discriminator of a vector type is malformed.
MalformedFuncTypeDiscriminator(u8)
The discriminator of a function type is malformed.
MalformedRefTypeDiscriminator(u8)
The discriminator of a reference type is malformed.
MalformedValType
A valtype is malformed because it is neither a number, reference nor vector type.
MalformedExportDescDiscriminator(u8)
The discriminator of an export description is malformed.
MalformedImportDescDiscriminator(u8)
The discriminator of an import description is malformed.
MalformedLimitsDiscriminator(u8)
The discriminator of a limits type is malformed.
MalformedLimitsMinLargerThanMax
The min field of a limits type is larger than the max field.
MalformedMutDiscriminator(u8)
The discriminator of a mut type is malformed.
MalformedBlockTypeTypeIdx(i64)
Block types use a special 33-bit signed integer for encoding type indices.
MalformedVariableLengthInteger
A variable-length integer was read but it overflowed.
MalformedElemKindDiscriminator(u8)
The discriminator of an element kind is malformed.
I33IsNegative
33-bit signed integers are sometimes used to encode unsigned 32-bit integers to prevent collisions between bit patterns of different types. Therefore, 33-bit signed integers may never be negative.
TooManyLocals(u64)
A function specifies too many locals, i.e. more than 2^32 - 1
MemoryTooLarge
The memory size specified by a mem type exceeds the maximum size.
Trait Implementations§
Source§impl Clone for DecodingError
impl Clone for DecodingError
Source§fn clone(&self) -> DecodingError
fn clone(&self) -> DecodingError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more