blob: 4baf6134942b4e686422f5fffa42d62dc21527aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
fileprivate struct FfiConverterUInt8: FfiConverterPrimitive {
typealias FfiType = UInt8
typealias SwiftType = UInt8
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> UInt8 {
return try lift(readInt(&buf))
}
public static func write(_ value: UInt8, into buf: inout [UInt8]) {
writeInt(&buf, lower(value))
}
}
|