boltffi_bindgen 0.2.0

Code generation library for BoltFFI - generates Swift, Kotlin, and TypeScript bindings
Documentation
1
2
3
4
5
6
7
8
9
{{ self::kdoc_block(doc, "") }}enum class {{ class_name }}(val value: {{ value_type }}) {
{%- for variant in variants %}
{{ self::kdoc_block(variant.doc, "    ") }}    {{ variant.name }}({{ self::kotlin_integer_literal(variant.tag, value_type) }}){% if !loop.last %},{% else %};{% endif %}
{%- endfor %}

    companion object {
        fun fromValue(value: {{ value_type }}): {{ class_name }} = entries.first { it.value == value }
    }
}