Enum tinywasm::ParseError
source · pub enum ParseError {
InvalidType,
UnsupportedSection(String),
DuplicateSection(String),
EmptySection(String),
UnsupportedOperator(String),
ParseError {
message: String,
offset: usize,
},
InvalidEncoding(Encoding),
InvalidLocalCount {
expected: u32,
actual: u32,
},
EndNotReached,
Other(String),
}
Expand description
Errors that can occur when parsing a WebAssembly module
Variants§
InvalidType
An invalid type was encountered
UnsupportedSection(String)
An unsupported section was encountered
DuplicateSection(String)
A duplicate section was encountered
EmptySection(String)
An empty section was encountered
UnsupportedOperator(String)
An unsupported operator was encountered
ParseError
Fields
An error occurred while parsing the module
InvalidEncoding(Encoding)
An invalid encoding was encountered
InvalidLocalCount
An invalid local count was encountered
EndNotReached
The end of the module was not reached
Other(String)
An unknown error occurred
Trait Implementations§
source§impl Debug for ParseError
impl Debug for ParseError
source§impl Display for ParseError
impl Display for ParseError
source§impl Error for ParseError
impl Error for ParseError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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 From<BinaryReaderError> for ParseError
impl From<BinaryReaderError> for ParseError
source§fn from(value: BinaryReaderError) -> ParseError
fn from(value: BinaryReaderError) -> ParseError
Converts to this type from the input type.
source§impl From<ParseError> for Error
impl From<ParseError> for Error
source§fn from(value: ParseError) -> Self
fn from(value: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnwindSafe for ParseError
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.