[][src]Function holochain_wasmer_host::guest::call

pub fn call<I: TryInto<SerializedBytes, Error = SerializedBytesError>, O: TryFrom<SerializedBytes, Error = SerializedBytesError>>(
    instance: &mut Instance,
    call: &str,
    serializable: I
) -> Result<O, WasmError>

convenience wrapper around call_bytes to handling input and output of any struct that:

  • is commonly defined in both the host and guest (e.g. shared in a common crate)
  • implements standard JsonString round-tripping (e.g. DefaultJson)