Debian Codegraph @

third_party/rust/uniffi_bindgen/src/bindings/kotlin/templates/UInt8Helper.kt

raw
1 /**
2 * @suppress
3 */
4 public object FfiConverterUByte: FfiConverter<UByte, Byte> {
5 override fun lift(value: Byte): UByte {
6 return value.toUByte()
7 }
8
9 override fun read(buf: ByteBuffer): UByte {
10 return lift(buf.get())
11 }
12
13 override fun lower(value: UByte): Byte {
14 return value.toByte()
15 }
16
17 override fun allocationSize(value: UByte) = 1UL
18
19 override fun write(value: UByte, buf: ByteBuffer) {
20 buf.put(value.toByte())
21 }
22 }