Same as [`Module::serialize`], except for a component. Note that the artifact produced here must be passed to [`Component::deserialize`] and is not compatible for use with [`Module`]. [`Module::serialize`]: crate::Module::serialize [`Module`]: crate::Module
(&self)
| 601 | /// [`Module::serialize`]: crate::Module::serialize |
| 602 | /// [`Module`]: crate::Module |
| 603 | pub fn serialize(&self) -> Result<Vec<u8>> { |
| 604 | let image = self.engine_code().image(); |
| 605 | let mut v = TryVec::new(); |
| 606 | v.reserve(image.len())?; |
| 607 | v.try_extend(image.iter().copied())?; |
| 608 | Ok(v.into()) |
| 609 | } |
| 610 | |
| 611 | /// Creates a new `VMFuncRef` with all fields filled out for the destructor |
| 612 | /// specified. |
nothing calls this directly
no test coverage detected