summaryrefslogtreecommitdiffstats
path: root/third_party/rust/uniffi_bindgen/src/bindings/kotlin/templates/Int8Helper.kt
blob: 27c98a665965ba44373ae4a757153f606200a91c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
public object FfiConverterByte: FfiConverter<Byte, Byte> {
    override fun lift(value: Byte): Byte {
        return value
    }

    override fun read(buf: ByteBuffer): Byte {
        return buf.get()
    }

    override fun lower(value: Byte): Byte {
        return value
    }

    override fun allocationSize(value: Byte) = 1UL

    override fun write(value: Byte, buf: ByteBuffer) {
        buf.put(value)
    }
}