@@ -397,6 +397,22 @@ fileprivate final class UniffiHandleMap<T>: @unchecked Sendable {
397
397
// Public interface members begin here.
398
398
399
399
400
+ #if swift(>=5.8)
401
+ @_documentation ( visibility: private)
402
+ #endif
403
+ fileprivate struct FfiConverterUInt64 : FfiConverterPrimitive {
404
+ typealias FfiType = UInt64
405
+ typealias SwiftType = UInt64
406
+
407
+ public static func read( from buf: inout ( data: Data , offset: Data . Index ) ) throws -> UInt64 {
408
+ return try lift ( readInt ( & buf) )
409
+ }
410
+
411
+ public static func write( _ value: SwiftType , into buf: inout [ UInt8 ] ) {
412
+ writeInt ( & buf, lower ( value) )
413
+ }
414
+ }
415
+
400
416
#if swift(>=5.8)
401
417
@_documentation ( visibility: private)
402
418
#endif
@@ -911,7 +927,7 @@ public protocol LoginStoreProtocol: AnyObject {
911
927
* NB: This function was created to unblock iOS logins users who are unable to sync logins and should not be used
912
928
* outside of this use case.
913
929
*/
914
- func deleteUndecryptableRecordsForRemoteReplacement( ) throws
930
+ func deleteUndecryptableRecordsForRemoteReplacement( ) throws -> LoginsDeletionMetrics
915
931
916
932
func findLoginToUpdate( look: LoginEntry ) throws -> Login ?
917
933
@@ -941,7 +957,7 @@ public protocol LoginStoreProtocol: AnyObject {
941
957
942
958
func setCheckpoint( checkpoint: String ) throws
943
959
944
- func shutdown( ) throws
960
+ func shutdown( )
945
961
946
962
func touch( id: String ) throws
947
963
@@ -1108,10 +1124,11 @@ open func deleteMany(ids: [String])throws -> [Bool] {
1108
1124
* NB: This function was created to unblock iOS logins users who are unable to sync logins and should not be used
1109
1125
* outside of this use case.
1110
1126
*/
1111
- open func deleteUndecryptableRecordsForRemoteReplacement( ) throws { try rustCallWithError ( FfiConverterTypeLoginsApiError_lift) {
1127
+ open func deleteUndecryptableRecordsForRemoteReplacement( ) throws -> LoginsDeletionMetrics {
1128
+ return try FfiConverterTypeLoginsDeletionMetrics_lift ( try rustCallWithError ( FfiConverterTypeLoginsApiError_lift) {
1112
1129
uniffi_logins_fn_method_loginstore_delete_undecryptable_records_for_remote_replacement ( self . uniffiClonePointer ( ) , $0
1113
1130
)
1114
- }
1131
+ } )
1115
1132
}
1116
1133
1117
1134
open func findLoginToUpdate( look: LoginEntry ) throws -> Login ? {
@@ -1198,7 +1215,7 @@ open func setCheckpoint(checkpoint: String)throws {try rustCallWithError(FfiCo
1198
1215
}
1199
1216
}
1200
1217
1201
- open func shutdown( ) throws { try rustCallWithError ( FfiConverterTypeLoginsApiError_lift ) {
1218
+ open func shutdown( ) { try ! rustCall ( ) {
1202
1219
uniffi_logins_fn_method_loginstore_shutdown ( self . uniffiClonePointer ( ) , $0
1203
1220
)
1204
1221
}
@@ -1969,6 +1986,80 @@ public func FfiConverterTypeLoginMeta_lower(_ value: LoginMeta) -> RustBuffer {
1969
1986
return FfiConverterTypeLoginMeta . lower ( value)
1970
1987
}
1971
1988
1989
+
1990
+ /**
1991
+ * Metrics tracking deletion of logins that cannot be decrypted, see `delete_undecryptable_records_for_remote_replacement`
1992
+ * for more details
1993
+ */
1994
+ public struct LoginsDeletionMetrics {
1995
+ public var localDeleted : UInt64
1996
+ public var mirrorDeleted : UInt64
1997
+
1998
+ // Default memberwise initializers are never public by default, so we
1999
+ // declare one manually.
2000
+ public init ( localDeleted: UInt64 , mirrorDeleted: UInt64 ) {
2001
+ self . localDeleted = localDeleted
2002
+ self . mirrorDeleted = mirrorDeleted
2003
+ }
2004
+ }
2005
+
2006
+ #if compiler(>=6)
2007
+ extension LoginsDeletionMetrics : Sendable { }
2008
+ #endif
2009
+
2010
+
2011
+ extension LoginsDeletionMetrics : Equatable , Hashable {
2012
+ public static func == ( lhs: LoginsDeletionMetrics , rhs: LoginsDeletionMetrics ) -> Bool {
2013
+ if lhs. localDeleted != rhs. localDeleted {
2014
+ return false
2015
+ }
2016
+ if lhs. mirrorDeleted != rhs. mirrorDeleted {
2017
+ return false
2018
+ }
2019
+ return true
2020
+ }
2021
+
2022
+ public func hash( into hasher: inout Hasher ) {
2023
+ hasher. combine ( localDeleted)
2024
+ hasher. combine ( mirrorDeleted)
2025
+ }
2026
+ }
2027
+
2028
+
2029
+
2030
+ #if swift(>=5.8)
2031
+ @_documentation ( visibility: private)
2032
+ #endif
2033
+ public struct FfiConverterTypeLoginsDeletionMetrics : FfiConverterRustBuffer {
2034
+ public static func read( from buf: inout ( data: Data , offset: Data . Index ) ) throws -> LoginsDeletionMetrics {
2035
+ return
2036
+ try LoginsDeletionMetrics (
2037
+ localDeleted: FfiConverterUInt64 . read ( from: & buf) ,
2038
+ mirrorDeleted: FfiConverterUInt64 . read ( from: & buf)
2039
+ )
2040
+ }
2041
+
2042
+ public static func write( _ value: LoginsDeletionMetrics , into buf: inout [ UInt8 ] ) {
2043
+ FfiConverterUInt64 . write ( value. localDeleted, into: & buf)
2044
+ FfiConverterUInt64 . write ( value. mirrorDeleted, into: & buf)
2045
+ }
2046
+ }
2047
+
2048
+
2049
+ #if swift(>=5.8)
2050
+ @_documentation ( visibility: private)
2051
+ #endif
2052
+ public func FfiConverterTypeLoginsDeletionMetrics_lift( _ buf: RustBuffer ) throws -> LoginsDeletionMetrics {
2053
+ return try FfiConverterTypeLoginsDeletionMetrics . lift ( buf)
2054
+ }
2055
+
2056
+ #if swift(>=5.8)
2057
+ @_documentation ( visibility: private)
2058
+ #endif
2059
+ public func FfiConverterTypeLoginsDeletionMetrics_lower( _ value: LoginsDeletionMetrics ) -> RustBuffer {
2060
+ return FfiConverterTypeLoginsDeletionMetrics . lower ( value)
2061
+ }
2062
+
1972
2063
// Note that we don't yet support `indirect` for enums.
1973
2064
// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
1974
2065
/**
@@ -2673,7 +2764,7 @@ private let initializationResult: InitializationResult = {
2673
2764
if ( uniffi_logins_checksum_method_loginstore_delete_many ( ) != 14564 ) {
2674
2765
return InitializationResult . apiChecksumMismatch
2675
2766
}
2676
- if ( uniffi_logins_checksum_method_loginstore_delete_undecryptable_records_for_remote_replacement ( ) != 23503 ) {
2767
+ if ( uniffi_logins_checksum_method_loginstore_delete_undecryptable_records_for_remote_replacement ( ) != 50136 ) {
2677
2768
return InitializationResult . apiChecksumMismatch
2678
2769
}
2679
2770
if ( uniffi_logins_checksum_method_loginstore_find_login_to_update ( ) != 62416 ) {
@@ -2709,7 +2800,7 @@ private let initializationResult: InitializationResult = {
2709
2800
if ( uniffi_logins_checksum_method_loginstore_set_checkpoint ( ) != 62504 ) {
2710
2801
return InitializationResult . apiChecksumMismatch
2711
2802
}
2712
- if ( uniffi_logins_checksum_method_loginstore_shutdown ( ) != 24418 ) {
2803
+ if ( uniffi_logins_checksum_method_loginstore_shutdown ( ) != 40399 ) {
2713
2804
return InitializationResult . apiChecksumMismatch
2714
2805
}
2715
2806
if ( uniffi_logins_checksum_method_loginstore_touch ( ) != 37362 ) {
0 commit comments