@@ -537,7 +537,7 @@ fileprivate struct FfiConverterData: FfiConverterRustBuffer {
537
537
538
538
539
539
540
- public protocol ContainerIdLike : Any {
540
+ public protocol ContainerIdLike : Any {
541
541
542
542
func asContainerId( ty: ContainerType ) -> ContainerId
543
543
@@ -4094,7 +4094,7 @@ public func FfiConverterTypeLoroUnknown_lower(_ value: LoroUnknown) -> UnsafeMut
4094
4094
4095
4095
4096
4096
4097
- public protocol LoroValueLike : Any {
4097
+ public protocol LoroValueLike : Any {
4098
4098
4099
4099
func asLoroValue( ) -> LoroValue
4100
4100
@@ -4968,6 +4968,18 @@ public protocol ValueOrContainerProtocol : AnyObject {
4968
4968
4969
4969
func asContainer( ) -> ContainerId ?
4970
4970
4971
+ func asLoroCounter( ) -> LoroCounter ?
4972
+
4973
+ func asLoroList( ) -> LoroList ?
4974
+
4975
+ func asLoroMap( ) -> LoroMap ?
4976
+
4977
+ func asLoroMovableList( ) -> LoroMovableList ?
4978
+
4979
+ func asLoroText( ) -> LoroText ?
4980
+
4981
+ func asLoroTree( ) -> LoroTree ?
4982
+
4971
4983
func asValue( ) -> LoroValue ?
4972
4984
4973
4985
func isContainer( ) -> Bool
@@ -5024,6 +5036,48 @@ open func asContainer() -> ContainerId? {
5024
5036
} )
5025
5037
}
5026
5038
5039
+ open func asLoroCounter( ) -> LoroCounter ? {
5040
+ return try ! FfiConverterOptionTypeLoroCounter . lift ( try ! rustCall ( ) {
5041
+ uniffi_loro_fn_method_valueorcontainer_as_loro_counter ( self . uniffiClonePointer ( ) , $0
5042
+ )
5043
+ } )
5044
+ }
5045
+
5046
+ open func asLoroList( ) -> LoroList ? {
5047
+ return try ! FfiConverterOptionTypeLoroList . lift ( try ! rustCall ( ) {
5048
+ uniffi_loro_fn_method_valueorcontainer_as_loro_list ( self . uniffiClonePointer ( ) , $0
5049
+ )
5050
+ } )
5051
+ }
5052
+
5053
+ open func asLoroMap( ) -> LoroMap ? {
5054
+ return try ! FfiConverterOptionTypeLoroMap . lift ( try ! rustCall ( ) {
5055
+ uniffi_loro_fn_method_valueorcontainer_as_loro_map ( self . uniffiClonePointer ( ) , $0
5056
+ )
5057
+ } )
5058
+ }
5059
+
5060
+ open func asLoroMovableList( ) -> LoroMovableList ? {
5061
+ return try ! FfiConverterOptionTypeLoroMovableList . lift ( try ! rustCall ( ) {
5062
+ uniffi_loro_fn_method_valueorcontainer_as_loro_movable_list ( self . uniffiClonePointer ( ) , $0
5063
+ )
5064
+ } )
5065
+ }
5066
+
5067
+ open func asLoroText( ) -> LoroText ? {
5068
+ return try ! FfiConverterOptionTypeLoroText . lift ( try ! rustCall ( ) {
5069
+ uniffi_loro_fn_method_valueorcontainer_as_loro_text ( self . uniffiClonePointer ( ) , $0
5070
+ )
5071
+ } )
5072
+ }
5073
+
5074
+ open func asLoroTree( ) -> LoroTree ? {
5075
+ return try ! FfiConverterOptionTypeLoroTree . lift ( try ! rustCall ( ) {
5076
+ uniffi_loro_fn_method_valueorcontainer_as_loro_tree ( self . uniffiClonePointer ( ) , $0
5077
+ )
5078
+ } )
5079
+ }
5080
+
5027
5081
open func asValue( ) -> LoroValue ? {
5028
5082
return try ! FfiConverterOptionTypeLoroValue . lift ( try ! rustCall ( ) {
5029
5083
uniffi_loro_fn_method_valueorcontainer_as_value ( self . uniffiClonePointer ( ) , $0
@@ -7112,6 +7166,132 @@ fileprivate struct FfiConverterOptionTypeCursor: FfiConverterRustBuffer {
7112
7166
}
7113
7167
}
7114
7168
7169
+ fileprivate struct FfiConverterOptionTypeLoroCounter : FfiConverterRustBuffer {
7170
+ typealias SwiftType = LoroCounter ?
7171
+
7172
+ public static func write( _ value: SwiftType , into buf: inout [ UInt8 ] ) {
7173
+ guard let value = value else {
7174
+ writeInt ( & buf, Int8 ( 0 ) )
7175
+ return
7176
+ }
7177
+ writeInt ( & buf, Int8 ( 1 ) )
7178
+ FfiConverterTypeLoroCounter . write ( value, into: & buf)
7179
+ }
7180
+
7181
+ public static func read( from buf: inout ( data: Data , offset: Data . Index ) ) throws -> SwiftType {
7182
+ switch try readInt ( & buf) as Int8 {
7183
+ case 0 : return nil
7184
+ case 1 : return try FfiConverterTypeLoroCounter . read ( from: & buf)
7185
+ default : throw UniffiInternalError . unexpectedOptionalTag
7186
+ }
7187
+ }
7188
+ }
7189
+
7190
+ fileprivate struct FfiConverterOptionTypeLoroList : FfiConverterRustBuffer {
7191
+ typealias SwiftType = LoroList ?
7192
+
7193
+ public static func write( _ value: SwiftType , into buf: inout [ UInt8 ] ) {
7194
+ guard let value = value else {
7195
+ writeInt ( & buf, Int8 ( 0 ) )
7196
+ return
7197
+ }
7198
+ writeInt ( & buf, Int8 ( 1 ) )
7199
+ FfiConverterTypeLoroList . write ( value, into: & buf)
7200
+ }
7201
+
7202
+ public static func read( from buf: inout ( data: Data , offset: Data . Index ) ) throws -> SwiftType {
7203
+ switch try readInt ( & buf) as Int8 {
7204
+ case 0 : return nil
7205
+ case 1 : return try FfiConverterTypeLoroList . read ( from: & buf)
7206
+ default : throw UniffiInternalError . unexpectedOptionalTag
7207
+ }
7208
+ }
7209
+ }
7210
+
7211
+ fileprivate struct FfiConverterOptionTypeLoroMap : FfiConverterRustBuffer {
7212
+ typealias SwiftType = LoroMap ?
7213
+
7214
+ public static func write( _ value: SwiftType , into buf: inout [ UInt8 ] ) {
7215
+ guard let value = value else {
7216
+ writeInt ( & buf, Int8 ( 0 ) )
7217
+ return
7218
+ }
7219
+ writeInt ( & buf, Int8 ( 1 ) )
7220
+ FfiConverterTypeLoroMap . write ( value, into: & buf)
7221
+ }
7222
+
7223
+ public static func read( from buf: inout ( data: Data , offset: Data . Index ) ) throws -> SwiftType {
7224
+ switch try readInt ( & buf) as Int8 {
7225
+ case 0 : return nil
7226
+ case 1 : return try FfiConverterTypeLoroMap . read ( from: & buf)
7227
+ default : throw UniffiInternalError . unexpectedOptionalTag
7228
+ }
7229
+ }
7230
+ }
7231
+
7232
+ fileprivate struct FfiConverterOptionTypeLoroMovableList : FfiConverterRustBuffer {
7233
+ typealias SwiftType = LoroMovableList ?
7234
+
7235
+ public static func write( _ value: SwiftType , into buf: inout [ UInt8 ] ) {
7236
+ guard let value = value else {
7237
+ writeInt ( & buf, Int8 ( 0 ) )
7238
+ return
7239
+ }
7240
+ writeInt ( & buf, Int8 ( 1 ) )
7241
+ FfiConverterTypeLoroMovableList . write ( value, into: & buf)
7242
+ }
7243
+
7244
+ public static func read( from buf: inout ( data: Data , offset: Data . Index ) ) throws -> SwiftType {
7245
+ switch try readInt ( & buf) as Int8 {
7246
+ case 0 : return nil
7247
+ case 1 : return try FfiConverterTypeLoroMovableList . read ( from: & buf)
7248
+ default : throw UniffiInternalError . unexpectedOptionalTag
7249
+ }
7250
+ }
7251
+ }
7252
+
7253
+ fileprivate struct FfiConverterOptionTypeLoroText : FfiConverterRustBuffer {
7254
+ typealias SwiftType = LoroText ?
7255
+
7256
+ public static func write( _ value: SwiftType , into buf: inout [ UInt8 ] ) {
7257
+ guard let value = value else {
7258
+ writeInt ( & buf, Int8 ( 0 ) )
7259
+ return
7260
+ }
7261
+ writeInt ( & buf, Int8 ( 1 ) )
7262
+ FfiConverterTypeLoroText . write ( value, into: & buf)
7263
+ }
7264
+
7265
+ public static func read( from buf: inout ( data: Data , offset: Data . Index ) ) throws -> SwiftType {
7266
+ switch try readInt ( & buf) as Int8 {
7267
+ case 0 : return nil
7268
+ case 1 : return try FfiConverterTypeLoroText . read ( from: & buf)
7269
+ default : throw UniffiInternalError . unexpectedOptionalTag
7270
+ }
7271
+ }
7272
+ }
7273
+
7274
+ fileprivate struct FfiConverterOptionTypeLoroTree : FfiConverterRustBuffer {
7275
+ typealias SwiftType = LoroTree ?
7276
+
7277
+ public static func write( _ value: SwiftType , into buf: inout [ UInt8 ] ) {
7278
+ guard let value = value else {
7279
+ writeInt ( & buf, Int8 ( 0 ) )
7280
+ return
7281
+ }
7282
+ writeInt ( & buf, Int8 ( 1 ) )
7283
+ FfiConverterTypeLoroTree . write ( value, into: & buf)
7284
+ }
7285
+
7286
+ public static func read( from buf: inout ( data: Data , offset: Data . Index ) ) throws -> SwiftType {
7287
+ switch try readInt ( & buf) as Int8 {
7288
+ case 0 : return nil
7289
+ case 1 : return try FfiConverterTypeLoroTree . read ( from: & buf)
7290
+ default : throw UniffiInternalError . unexpectedOptionalTag
7291
+ }
7292
+ }
7293
+ }
7294
+
7115
7295
fileprivate struct FfiConverterOptionTypeOnPop : FfiConverterRustBuffer {
7116
7296
typealias SwiftType = OnPop ?
7117
7297
@@ -8137,6 +8317,24 @@ private var initializationResult: InitializationResult = {
8137
8317
if ( uniffi_loro_checksum_method_valueorcontainer_as_container ( ) != 61163 ) {
8138
8318
return InitializationResult . apiChecksumMismatch
8139
8319
}
8320
+ if ( uniffi_loro_checksum_method_valueorcontainer_as_loro_counter ( ) != 51072 ) {
8321
+ return InitializationResult . apiChecksumMismatch
8322
+ }
8323
+ if ( uniffi_loro_checksum_method_valueorcontainer_as_loro_list ( ) != 16144 ) {
8324
+ return InitializationResult . apiChecksumMismatch
8325
+ }
8326
+ if ( uniffi_loro_checksum_method_valueorcontainer_as_loro_map ( ) != 62391 ) {
8327
+ return InitializationResult . apiChecksumMismatch
8328
+ }
8329
+ if ( uniffi_loro_checksum_method_valueorcontainer_as_loro_movable_list ( ) != 49359 ) {
8330
+ return InitializationResult . apiChecksumMismatch
8331
+ }
8332
+ if ( uniffi_loro_checksum_method_valueorcontainer_as_loro_text ( ) != 8015 ) {
8333
+ return InitializationResult . apiChecksumMismatch
8334
+ }
8335
+ if ( uniffi_loro_checksum_method_valueorcontainer_as_loro_tree ( ) != 39545 ) {
8336
+ return InitializationResult . apiChecksumMismatch
8337
+ }
8140
8338
if ( uniffi_loro_checksum_method_valueorcontainer_as_value ( ) != 9638 ) {
8141
8339
return InitializationResult . apiChecksumMismatch
8142
8340
}
0 commit comments