Debian Codegraph @

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

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