Rename EngineExport to Export

This commit is contained in:
Mark McCaskey
2020-11-30 12:32:53 -08:00
parent 9e0cfcebbb
commit 03410c15a1
21 changed files with 162 additions and 158 deletions

View File

@@ -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(),