@@ -2421,6 +2421,10 @@ public protocol FrontiersProtocol : AnyObject {
24212421
24222422 func eq(other: Frontiers) -> Bool
24232423
2424+ func isEmpty() -> Bool
2425+
2426+ func toVec() -> [Id]
2427+
24242428}
24252429
24262430open class Frontiers:
@@ -2519,6 +2523,20 @@ open func eq(other: Frontiers) -> Bool {
25192523})
25202524}
25212525
2526+ open func isEmpty() -> Bool {
2527+ return try! FfiConverterBool.lift(try! rustCall() {
2528+ uniffi_loro_ffi_fn_method_frontiers_is_empty(self.uniffiClonePointer(),$0
2529+ )
2530+ })
2531+ }
2532+
2533+ open func toVec() -> [Id] {
2534+ return try! FfiConverterSequenceTypeID.lift(try! rustCall() {
2535+ uniffi_loro_ffi_fn_method_frontiers_to_vec(self.uniffiClonePointer(),$0
2536+ )
2537+ })
2538+ }
2539+
25222540
25232541}
25242542
@@ -10492,6 +10510,13 @@ public protocol VersionVectorProtocol : AnyObject {
1049210510
1049310511 func setLast(id: Id)
1049410512
10513+ func toHashmap() -> [UInt64: Int32]
10514+
10515+ /**
10516+ * Update the end counter of the given client if the end is greater. Return whether updated
10517+ */
10518+ func tryUpdateLast(id: Id) -> Bool
10519+
1049510520}
1049610521
1049710522open class VersionVector:
@@ -10658,6 +10683,24 @@ open func setLast(id: Id) {try! rustCall() {
1065810683}
1065910684}
1066010685
10686+ open func toHashmap() -> [UInt64: Int32] {
10687+ return try! FfiConverterDictionaryUInt64Int32.lift(try! rustCall() {
10688+ uniffi_loro_ffi_fn_method_versionvector_to_hashmap(self.uniffiClonePointer(),$0
10689+ )
10690+ })
10691+ }
10692+
10693+ /**
10694+ * Update the end counter of the given client if the end is greater. Return whether updated
10695+ */
10696+ open func tryUpdateLast(id: Id) -> Bool {
10697+ return try! FfiConverterBool.lift(try! rustCall() {
10698+ uniffi_loro_ffi_fn_method_versionvector_try_update_last(self.uniffiClonePointer(),
10699+ FfiConverterTypeID.lower(id),$0
10700+ )
10701+ })
10702+ }
10703+
1066110704
1066210705}
1066310706
@@ -16027,6 +16070,32 @@ fileprivate struct FfiConverterSequenceTypeTextDelta: FfiConverterRustBuffer {
1602716070 }
1602816071}
1602916072
16073+ #if swift(>=5.8)
16074+ @_documentation(visibility: private)
16075+ #endif
16076+ fileprivate struct FfiConverterDictionaryUInt64Int32: FfiConverterRustBuffer {
16077+ public static func write(_ value: [UInt64: Int32], into buf: inout [UInt8]) {
16078+ let len = Int32(value.count)
16079+ writeInt(&buf, len)
16080+ for (key, value) in value {
16081+ FfiConverterUInt64.write(key, into: &buf)
16082+ FfiConverterInt32.write(value, into: &buf)
16083+ }
16084+ }
16085+
16086+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> [UInt64: Int32] {
16087+ let len: Int32 = try readInt(&buf)
16088+ var dict = [UInt64: Int32]()
16089+ dict.reserveCapacity(Int(len))
16090+ for _ in 0..<len {
16091+ let key = try FfiConverterUInt64.read(from: &buf)
16092+ let value = try FfiConverterInt32.read(from: &buf)
16093+ dict[key] = value
16094+ }
16095+ return dict
16096+ }
16097+ }
16098+
1603016099#if swift(>=5.8)
1603116100@_documentation(visibility: private)
1603216101#endif
@@ -16280,6 +16349,12 @@ private var initializationResult: InitializationResult = {
1628016349 if (uniffi_loro_ffi_checksum_method_frontiers_eq() != 19191) {
1628116350 return InitializationResult.apiChecksumMismatch
1628216351 }
16352+ if (uniffi_loro_ffi_checksum_method_frontiers_is_empty() != 14722) {
16353+ return InitializationResult.apiChecksumMismatch
16354+ }
16355+ if (uniffi_loro_ffi_checksum_method_frontiers_to_vec() != 15210) {
16356+ return InitializationResult.apiChecksumMismatch
16357+ }
1628316358 if (uniffi_loro_ffi_checksum_method_localephemerallistener_on_ephemeral_update() != 58755) {
1628416359 return InitializationResult.apiChecksumMismatch
1628516360 }
@@ -17183,6 +17258,12 @@ private var initializationResult: InitializationResult = {
1718317258 if (uniffi_loro_ffi_checksum_method_versionvector_set_last() != 28435) {
1718417259 return InitializationResult.apiChecksumMismatch
1718517260 }
17261+ if (uniffi_loro_ffi_checksum_method_versionvector_to_hashmap() != 56398) {
17262+ return InitializationResult.apiChecksumMismatch
17263+ }
17264+ if (uniffi_loro_ffi_checksum_method_versionvector_try_update_last() != 58412) {
17265+ return InitializationResult.apiChecksumMismatch
17266+ }
1718617267 if (uniffi_loro_ffi_checksum_constructor_awareness_new() != 18821) {
1718717268 return InitializationResult.apiChecksumMismatch
1718817269 }
0 commit comments