mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-04 13:41:11 +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:
@@ -28,8 +28,17 @@ public protocol FlatbuffersInitializable {
|
||||
init(_ bb: ByteBuffer, o: Int32)
|
||||
}
|
||||
|
||||
/// FlatbufferObject structures all the Flatbuffers objects
|
||||
public protocol FlatBufferObject: FlatbuffersInitializable {
|
||||
/// FlatbufferTabke structures all the Flatbuffers tables
|
||||
public protocol FlatBufferTable: FlatbuffersInitializable,
|
||||
FlatbuffersVectorInitializable
|
||||
{
|
||||
var __buffer: ByteBuffer! { get }
|
||||
}
|
||||
|
||||
/// FlatbufferStruct structures all the Flatbuffers structs
|
||||
public protocol FlatBufferStruct: FlatbuffersInitializable,
|
||||
FlatbuffersVectorInitializable
|
||||
{
|
||||
var __buffer: ByteBuffer! { get }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user