Debian Codegraph @

third_party/rust/uniffi_bindgen/src/bindings/python/templates/CallbackInterfaceTemplate.py

raw
1 {%- let cbi = ci.get_callback_interface_definition(name).unwrap() %}
2 {%- let ffi_init_callback = cbi.ffi_init_callback() %}
3 {%- let protocol_name = type_name.clone() %}
4 {%- let protocol_base_class = "typing.Protocol" %}
5 {%- let protocol_docstring = cbi.docstring() %}
6 {%- let vtable = cbi.vtable() %}
7 {%- let methods = cbi.methods() %}
8 {%- let vtable_methods = cbi.vtable_methods() %}
9
10 {% include "Protocol.py" %}
11 {% include "CallbackInterfaceImpl.py" %}
12
13 # The _UniffiConverter which transforms the Callbacks in to Handles to pass to Rust.
14 {{ ffi_converter_name }} = _UniffiCallbackInterfaceFfiConverter()