alef 0.110.2

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
9
// {{ method_name }} starts the stream using a background context.
// Use {{ method_name }}WithContext to cancel a stream before it ends.
func ({{ receiver_name }} *{{ receiver_type }}) {{ method_name }}({{ params }}) (<-chan {{ item_type }}, error) {
	stream, err := {{ receiver_name }}.{{ method_with_context_name }}(context.Background(){% if param_args %}, {{ param_args }}{% endif %})
	if err != nil {
		return nil, err
	}
	return stream.Chan(), nil
}