wasmtime/runtime/vm/
export.rs1use crate::runtime::vm::{SharedMemory, VMMemoryImport};
2
3pub enum Export {
5 Function(crate::Func),
7
8 Table(crate::Table),
10
11 Memory(crate::Memory),
13
14 SharedMemory(SharedMemory, VMMemoryImport),
16
17 Global(crate::Global),
19
20 Tag(crate::Tag),
22}
23
24pub enum ExportMemory {
25 Unshared(crate::Memory),
26 Shared(SharedMemory, VMMemoryImport),
27}
28
29impl ExportMemory {
30 pub fn unshared(self) -> Option<crate::Memory> {
31 match self {
32 ExportMemory::Unshared(m) => Some(m),
33 ExportMemory::Shared(..) => None,
34 }
35 }
36}