alef 0.109.6

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// {{ go_func_name }} starts the stream using a background context.
// Use {{ go_func_with_context_name }} to cancel a stream before it ends.
func {{ go_func_name }}({{ params }}) ({{ compatibility_return_type }}) {
	stream, err := {{ go_func_with_context_name }}({{ compatibility_args }})
	if err != nil {
		return nil, err
	}
	return stream.Chan(), nil
}

// {{ go_func_with_context_name }} wraps the {{ owner_type }}.{{ method_call_name }} streaming adapter,
// exposing its cancellable stream as a module-level function.
func {{ go_func_with_context_name }}({{ context_params }}) ({{ context_return_type }}) {
{% if request_construction %}
	{{ request_construction }}
{% endif %}
	return {{ method_call }}
}