[][src]Macro holochain_wasmer_guest::host_args

macro_rules! host_args {
    ( $ptr:ident ) => { ... };
}

given a host allocation pointer and a type that implements TryFrom

  • map bytes from the host into the guest
  • restore a JsonString from the mapped bytes
  • try to deserialize the given type from the restored JsonString
  • if the deserialization fails, short circuit (return early) with a WasmError
  • if everything is Ok, return the restored data as a native rust type inside the guest