pub enum LinkerError {
DuplicateDefinition {
import_name: ImportName,
import_item: Extern,
},
CannotFindDefinitionForImport {
name: ImportName,
item_type: ExternType,
},
FuncTypeMismatch {
name: ImportName,
expected: FuncType,
actual: FuncType,
},
Table(TableError),
Memory(MemoryError),
GlobalTypeMismatch {
name: ImportName,
expected: GlobalType,
actual: 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: ImportName
The duplicate import name of the definition.
CannotFindDefinitionForImport
Encountered when no definition for an import is found.
Fields
name: ImportName
The name of the import for which no definition was found.
item_type: ExternType
The type of the import for which no definition has been found.
FuncTypeMismatch
Encountered when a function signature does not match the expected signature.
Fields
name: ImportName
The name of the import with the mismatched type.
Table(TableError)
Occurs when an imported table does not satisfy the required table type.
Memory(MemoryError)
Occurs when an imported memory does not satisfy the required memory type.
GlobalTypeMismatch
Encountered when an imported global variable has a mismatching global variable type.
Fields
name: ImportName
The name of the import with the mismatched type.
expected: GlobalType
The expected global variable type.
actual: GlobalType
The actual global variable type found.
Implementations§
Source§impl LinkerError
impl LinkerError
Sourcepub fn cannot_find_definition_of_import(import: &ImportType<'_>) -> Self
pub fn cannot_find_definition_of_import(import: &ImportType<'_>) -> Self
Creates a new LinkerError
for when an imported definition was not 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
impl Error for LinkerError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§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
Source§impl From<MemoryError> for LinkerError
impl From<MemoryError> for LinkerError
Source§fn from(error: MemoryError) -> Self
fn from(error: MemoryError) -> Self
Source§impl From<TableError> for LinkerError
impl From<TableError> for LinkerError
Source§fn from(error: TableError) -> Self
fn from(error: TableError) -> 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§
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
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.