Debian Codegraph @

third_party/rust/uniffi_bindgen/src/bindings/swift/templates/UInt32Helper.swift

raw
1 #if swift(>=5.8)
2 @_documentation(visibility: private)
3 #endif
4 fileprivate struct FfiConverterUInt32: FfiConverterPrimitive {
5 typealias FfiType = UInt32
6 typealias SwiftType = UInt32
7
8 public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> UInt32 {
9 return try lift(readInt(&buf))
10 }
11
12 public static func write(_ value: SwiftType, into buf: inout [UInt8]) {
13 writeInt(&buf, lower(value))
14 }
15 }