use crate::runtime::vm::{SharedMemory, VMMemoryImport};
pub enum Export {
Function(crate::Func),
Table(crate::Table),
Memory(crate::Memory),
SharedMemory(SharedMemory, VMMemoryImport),
Global(crate::Global),
Tag(crate::Tag),
}
pub enum ExportMemory {
Unshared(crate::Memory),
Shared(SharedMemory, VMMemoryImport),
}
impl ExportMemory {
pub fn unshared(self) -> Option<crate::Memory> {
match self {
ExportMemory::Unshared(m) => Some(m),
ExportMemory::Shared(..) => None,
}
}
pub fn shared(self) -> Option<SharedMemory> {
match self {
ExportMemory::Unshared(_) => None,
ExportMemory::Shared(m, _) => Some(m),
}
}
}