Debian Codegraph @

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

raw
1 /**
2 * @suppress
3 */
4 public object FfiConverterUInt: FfiConverter<UInt, Int> {
5 override fun lift(value: Int): UInt {
6 return value.toUInt()
7 }
8
9 override fun read(buf: ByteBuffer): UInt {
10 return lift(buf.getInt())
11 }
12
13 override fun lower(value: UInt): Int {
14 return value.toInt()
15 }
16
17 override fun allocationSize(value: UInt) = 4UL
18
19 override fun write(value: UInt, buf: ByteBuffer) {
20 buf.putInt(value.toInt())
21 }
22 }