Debian Codegraph @

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

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