Enum wasm_encoder::reencode::Error
source · pub enum Error<E = Infallible> {
CanonicalizedHeapTypeReference,
InvalidConstExpr,
InvalidCodeSectionSize,
UnexpectedNonCoreModuleSection,
UnexpectedNonComponentSection,
UnsupportedCoreTypeInComponent,
ParseError(BinaryReaderError),
UserError(E),
}
Expand description
An error when re-encoding from wasmparser
to wasm-encoder
.
Variants§
CanonicalizedHeapTypeReference
There was a type reference that was canonicalized and no longer references an index into a module’s types space, so we cannot encode it into a Wasm binary again.
InvalidConstExpr
The const expression is invalid: not actually constant or something like that.
InvalidCodeSectionSize
The code section size listed was not valid for the wasm binary provided.
UnexpectedNonCoreModuleSection
There was a section that does not belong into a core wasm module.
UnexpectedNonComponentSection
There was a section that does not belong into a compoennt module.
UnsupportedCoreTypeInComponent
A core type definition was found in a component that’s not supported.
ParseError(BinaryReaderError)
There was an error when parsing.
UserError(E)
There was a user-defined error when re-encoding.
Trait Implementations§
source§impl<E: 'static + Error> Error for Error<E>
impl<E: 'static + Error> Error for Error<E>
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<E> From<BinaryReaderError> for Error<E>
impl<E> From<BinaryReaderError> for Error<E>
source§fn from(err: BinaryReaderError) -> Self
fn from(err: BinaryReaderError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<E> Freeze for Error<E>where
E: Freeze,
impl<E> RefUnwindSafe for Error<E>where
E: RefUnwindSafe,
impl<E> Send for Error<E>where
E: Send,
impl<E> Sync for Error<E>where
E: Sync,
impl<E> Unpin for Error<E>where
E: Unpin,
impl<E> UnwindSafe for Error<E>where
E: UnwindSafe,
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