pub enum LinkError {
IncorrectImportType {
namespace: String,
name: String,
expected: String,
found: String,
},
IncorrectImportSignature {
namespace: String,
name: String,
expected: FuncSig,
found: FuncSig,
},
ImportNotFound {
namespace: String,
name: String,
},
IncorrectMemoryDescriptor {
namespace: String,
name: String,
expected: MemoryDescriptor,
found: MemoryDescriptor,
},
IncorrectTableDescriptor {
namespace: String,
name: String,
expected: TableDescriptor,
found: TableDescriptor,
},
IncorrectGlobalDescriptor {
namespace: String,
name: String,
expected: GlobalDescriptor,
found: GlobalDescriptor,
},
Generic {
message: String,
},
}
Expand description
This is returned when the runtime is unable to correctly link the module with the provided imports.
Comparing two LinkError
s always evaluates to false.
Variants§
IncorrectImportType
The type of the provided import does not match the expected type.
Fields
IncorrectImportSignature
The signature of the provided import does not match the expected signature.
Fields
ImportNotFound
An expected import was not provided.
IncorrectMemoryDescriptor
The memory descriptor provided does not match the expected descriptor.
IncorrectTableDescriptor
The table descriptor provided does not match the expected descriptor.
IncorrectGlobalDescriptor
The global descriptor provided does not match the expected descriptor.
Generic
A generic error with a message.
Trait Implementations§
Source§impl Error for LinkError
impl Error for LinkError
1.30.0 · 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()
Auto Trait Implementations§
impl Freeze for LinkError
impl RefUnwindSafe for LinkError
impl Send for LinkError
impl Sync for LinkError
impl Unpin for LinkError
impl UnwindSafe for LinkError
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