mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-05 00:07:04 +00:00
[Swift] Implements FlatbuffersVector which confirms to RandomAccessCollection (#8752)
* Implements FlatbuffersVector in swift Implements FlatbuffersVector which confirms to RandomAccessCollection, this would give us semi-native sugary syntax to all the arrays in swift port. This work will also be the foundation of using arrays in swift * Fix failing tests for Swift
This commit is contained in:
@@ -8,7 +8,7 @@ import Common
|
||||
|
||||
import FlatBuffers
|
||||
|
||||
public struct Property: NativeStruct, Verifiable, FlatbuffersInitializable, NativeObject {
|
||||
public struct Property: NativeStruct, FlatbuffersVectorInitializable, Verifiable, FlatbuffersInitializable, NativeObject {
|
||||
|
||||
static func validateVersion() { FlatBuffersVersion_25_9_23() }
|
||||
|
||||
@@ -51,7 +51,7 @@ extension Property: Encodable {
|
||||
}
|
||||
}
|
||||
|
||||
public struct Property_Mutable: FlatBufferObject {
|
||||
public struct Property_Mutable: FlatBufferStruct, FlatbuffersVectorInitializable {
|
||||
|
||||
static func validateVersion() { FlatBuffersVersion_25_9_23() }
|
||||
public var __buffer: ByteBuffer! { return _accessor.bb }
|
||||
@@ -76,7 +76,7 @@ public struct Property_Mutable: FlatBufferObject {
|
||||
}
|
||||
}
|
||||
|
||||
public struct TestMutatingBool: FlatBufferObject, Verifiable, ObjectAPIPacker {
|
||||
public struct TestMutatingBool: FlatBufferTable, FlatbuffersVectorInitializable, Verifiable, ObjectAPIPacker {
|
||||
|
||||
static func validateVersion() { FlatBuffersVersion_25_9_23() }
|
||||
public var __buffer: ByteBuffer! { return _accessor.bb }
|
||||
|
||||
Reference in New Issue
Block a user