Struct wasm_gc::GcResult [−][src]
pub struct GcResult(_);
Methods
impl GcResult
[src]
impl GcResult
pub fn into_module<T: Any>(self) -> Result<T, Self>
[src]
pub fn into_module<T: Any>(self) -> Result<T, Self>
Attepts to downcast this GcResult
into an instance of
parity_wasm::Module
.
If your crate's parity_wasm
crate is a different version than this
crate then this method will fail and you'll need to use into_bytes
.
Otherwise the module is successfully extracted and returned.
pub fn into_bytes(self) -> Result<Vec<u8>, Error>
[src]
pub fn into_bytes(self) -> Result<Vec<u8>, Error>
Convert this GcResult
into a serialized wasm module.
Returns any error that happens during serialization, which shouldn't happen for valid modules.