pub enum LinkerError {
DuplicateDefinition {
import_name: ImportName,
},
MissingDefinition {
name: ImportName,
ty: ExternType,
},
InvalidTypeDefinition {
name: ImportName,
expected: ExternType,
found: ExternType,
},
FuncTypeMismatch {
name: ImportName,
expected: FuncType,
found: FuncType,
},
InvalidTableSubtype {
name: ImportName,
ty: TableType,
other: TableType,
},
InvalidMemorySubtype {
name: ImportName,
ty: MemoryType,
other: MemoryType,
},
GlobalTypeMismatch {
name: ImportName,
expected: GlobalType,
found: GlobalType,
},
}Expand description
An error that may occur upon operating with Linker instances.
Variants§
DuplicateDefinition
Encountered duplicate definitions for the same name.
Fields
import_name: ImportNameThe duplicate import name of the definition.
MissingDefinition
Encountered when no definition for an import is found.
Fields
name: ImportNameThe name of the import for which no definition was found.
ty: ExternTypeThe type of the import for which no definition has been found.
InvalidTypeDefinition
Encountered when a definition with invalid type is found.
Fields
name: ImportNameThe name of the import for which no definition was found.
expected: ExternTypeThe expected import type.
found: ExternTypeThe found definition type.
FuncTypeMismatch
Fields
name: ImportNameThe name of the import with the mismatched type.
InvalidTableSubtype
Fields
InvalidMemorySubtype
Encountered when a MemoryType does not match the expected MemoryType.
Fields
name: ImportNameThe name of the import with the invalid MemoryType.
ty: MemoryTypeThe MemoryType that is supposed to be a subtype of other.
other: MemoryTypeThe MemoryType this is supposed to be a supertype of ty.
GlobalTypeMismatch
Encountered when a GlobalType does not match the expected GlobalType.
Fields
name: ImportNameThe name of the import with the mismatched type.
expected: GlobalTypeThe expected GlobalType.
found: GlobalTypeThe mismatching GlobalType found.
Trait Implementations§
Source§impl Debug for LinkerError
impl Debug for LinkerError
Source§impl Display for LinkerError
impl Display for LinkerError
Source§impl Error for LinkerError
Available on crate feature std only.
impl Error for LinkerError
std only.1.30.0§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<LinkerError> for Error
impl From<LinkerError> for Error
Source§fn from(error: LinkerError) -> Self
fn from(error: LinkerError) -> Self
Auto Trait Implementations§
impl Freeze for LinkerError
impl RefUnwindSafe for LinkerError
impl Send for LinkerError
impl Sync for LinkerError
impl Unpin for LinkerError
impl UnwindSafe for LinkerError
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.