alef 0.115.6

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
extension RustBridge.{{ type_name }}Ref {
{% for accessor in accessors %}    /// The whole value of `{{ accessor.field }}`, parts included. `{{ accessor.field }}()` returns only its text.
    public func {{ accessor.name }}() throws -> {{ accessor.value_type }} {
        try JSONDecoder().decode({{ accessor.value_type }}.self, from: Data({{ accessor.json_getter }}().toString().utf8))
    }
{% endfor %}}