mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-06 12:48:20 +00:00
Rename EngineExport to Export
This commit is contained in:
14
lib/api/src/externals/mod.rs
vendored
14
lib/api/src/externals/mod.rs
vendored
@@ -17,7 +17,7 @@ use crate::exports::{ExportError, Exportable};
|
||||
use crate::store::{Store, StoreObject};
|
||||
use crate::ExternType;
|
||||
use std::fmt;
|
||||
use wasmer_engine::EngineExport;
|
||||
use wasmer_engine::Export;
|
||||
|
||||
/// An `Extern` is the runtime representation of an entity that
|
||||
/// can be imported or exported.
|
||||
@@ -47,18 +47,18 @@ impl Extern {
|
||||
}
|
||||
|
||||
/// Create an `Extern` from an `Export`.
|
||||
pub fn from_export(store: &Store, export: EngineExport) -> Self {
|
||||
pub fn from_export(store: &Store, export: Export) -> Self {
|
||||
match export {
|
||||
EngineExport::Function(f) => Self::Function(Function::from_export(store, f)),
|
||||
EngineExport::Memory(m) => Self::Memory(Memory::from_export(store, m)),
|
||||
EngineExport::Global(g) => Self::Global(Global::from_export(store, g)),
|
||||
EngineExport::Table(t) => Self::Table(Table::from_export(store, t)),
|
||||
Export::Function(f) => Self::Function(Function::from_export(store, f)),
|
||||
Export::Memory(m) => Self::Memory(Memory::from_export(store, m)),
|
||||
Export::Global(g) => Self::Global(Global::from_export(store, g)),
|
||||
Export::Table(t) => Self::Table(Table::from_export(store, t)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Exportable<'a> for Extern {
|
||||
fn to_export(&self) -> EngineExport {
|
||||
fn to_export(&self) -> Export {
|
||||
match self {
|
||||
Self::Function(f) => f.to_export(),
|
||||
Self::Global(g) => g.to_export(),
|
||||
|
||||
Reference in New Issue
Block a user