wasmer_wasix::syscalls::wasix::reflect_signature

Function reflect_signature

Source
pub fn reflect_signature<M: MemorySize>(
    ctx: FunctionEnvMut<'_, WasiEnv>,
    function_id: u32,
    argument_types: WasmPtr<WasmValueType, M>,
    argument_types_len: u16,
    result_types: WasmPtr<WasmValueType, M>,
    result_types_len: u16,
    result: WasmPtr<ReflectionResult, M>,
) -> Result<Errno, WasiError>
Expand description

Provides information about a function’s signature.

§Errors

Besides the standard error codes, reflect_signature may set errno to the following values:

  • Errno::Inval: The function pointer is not valid, i.e. it does not point to a function in the indirect function table or the function has a unsupported signature. The sizes in the result are undefined in this case.
  • Errno::Overflow: The argument_types and result_types buffers were not big enough to hold the signature. They will be left unchanged. The reflection result will be valid.