mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-29 05:00:00 +00:00
[Swift] Object API support (#5826)
* Adds Object-api support to swift * Fixed indentation issues * Removed indentation within namespaces
This commit is contained in:
@@ -6,6 +6,14 @@ public protocol FlatBufferObject {
|
||||
init(_ bb: ByteBuffer, o: Int32)
|
||||
}
|
||||
|
||||
public protocol NativeTable {}
|
||||
|
||||
public protocol ObjectAPI {
|
||||
associatedtype T
|
||||
static func pack(_ builder: inout FlatBufferBuilder, obj: inout T) -> Offset<UOffset>
|
||||
mutating func unpack() -> T
|
||||
}
|
||||
|
||||
/// Readable is structures all the Flatbuffers structs
|
||||
///
|
||||
/// Readable is a procotol that each Flatbuffer struct should confirm to since
|
||||
|
||||
Reference in New Issue
Block a user