(
&mut self,
store: &StoreOpaque,
item: &crate::runtime::vm::Export,
)
| 719 | /// it contains a bunch of raw pointers. |
| 720 | #[cfg(feature = "component-model")] |
| 721 | pub(crate) fn push_export( |
| 722 | &mut self, |
| 723 | store: &StoreOpaque, |
| 724 | item: &crate::runtime::vm::Export, |
| 725 | ) -> Result<(), OutOfMemory> { |
| 726 | match item { |
| 727 | crate::runtime::vm::Export::Function(f) => { |
| 728 | self.functions.push(f.vmimport(store))?; |
| 729 | } |
| 730 | crate::runtime::vm::Export::Global(g) => { |
| 731 | self.globals.push(g.vmimport(store))?; |
| 732 | } |
| 733 | crate::runtime::vm::Export::Table(t) => { |
| 734 | self.tables.push(t.vmimport(store))?; |
| 735 | } |
| 736 | crate::runtime::vm::Export::Memory(m) => { |
| 737 | self.memories.push(m.vmimport(store))?; |
| 738 | } |
| 739 | crate::runtime::vm::Export::SharedMemory(_, vmimport) => { |
| 740 | self.memories.push(*vmimport)?; |
| 741 | } |
| 742 | crate::runtime::vm::Export::Tag(t) => { |
| 743 | self.tags.push(t.vmimport(store))?; |
| 744 | } |
| 745 | } |
| 746 | Ok(()) |
| 747 | } |
| 748 | |
| 749 | pub(crate) fn as_ref(&self) -> Imports<'_> { |
| 750 | Imports { |
no test coverage detected