use ctre_sys::{{ mod_name.lower() }}::*; use ::{ErrorCode, ParamEnum, Result}; pub struct {{ mod_name }} { handle: Handle, } impl {{ mod_name }} { fn handle(&self) -> Handle { self.handle } {% for header in headers %} {% for fn in header.functions %} pub fn {{ fn.meth_name }}({% if fn.handle_param_idx == 0 %}&self, {% endif %}{{ fn.in_params | join(', ', attribute='rust_decl') }}){% if fn.rust_returns %} -> {{ fn.rust_returns }}{% endif %} { {% if fn.out_params %} cci_get_call{% if fn.num_array_params %}_array{% endif %}!({{ fn.name }}( self.get_handle(), {% for p in fn.parameters[1:] %} {% if p.pointer or p.array %} _: {{ p.rust_type }}, // {{ p.snake_name }} {% else %} {{ p.snake_name }}, {% endif %} {% endfor %} )) {% else %} unsafe { {{ fn.name }}({% if fn.handle_param_idx == 0 %}self.handle(), {% endif %}{{ fn.in_params | join(', ', attribute='snake_name') }}) } {% endif %} } {% endfor %} {% endfor %} }