uniffi_bindgen 0.32.0

a multi-language bindings generator for rust (codegen and cli tooling)
Documentation
{%- if func.is_async() %}

def self.{{ func.name()|fn_name_rb }}({%- call rb::arg_list_decl(func) %}{% endcall -%})
  {%- call rb::setup_args(func) %}{% endcall %}
  {% call rb::to_ffi_call_async(func) %}{% endcall %}
end
{%- else %}

{%- match func.return_type() -%}
{%- when Some with (return_type) %}

def self.{{ func.name()|fn_name_rb }}({%- call rb::arg_list_decl(func) %}{% endcall -%})
  {%- call rb::setup_args(func) %}{% endcall %}
  result = {% call rb::to_ffi_call(func) %}{% endcall %}
  return {{ "result"|lift_rb(return_type, config) }}
end

{% when None %}

def self.{{ func.name()|fn_name_rb }}({%- call rb::arg_list_decl(func) %}{% endcall -%})
  {%- call rb::setup_args(func) %}{% endcall %}
  {% call rb::to_ffi_call(func) %}{% endcall %}
end
{% endmatch %}
{%- endif %}