@@ -1843,14 +1843,14 @@ public struct HistoryVisitInfo {
1843
1843
public var url : Url
1844
1844
public var title : String ?
1845
1845
public var timestamp : PlacesTimestamp
1846
- public var visitType : VisitTransition
1846
+ public var visitType : VisitType
1847
1847
public var isHidden : Bool
1848
1848
public var previewImageUrl : Url ?
1849
1849
public var isRemote : Bool
1850
1850
1851
1851
// Default memberwise initializers are never public by default, so we
1852
1852
// declare one manually.
1853
- public init ( url: Url , title: String ? , timestamp: PlacesTimestamp , visitType: VisitTransition , isHidden: Bool , previewImageUrl: Url ? , isRemote: Bool ) {
1853
+ public init ( url: Url , title: String ? , timestamp: PlacesTimestamp , visitType: VisitType , isHidden: Bool , previewImageUrl: Url ? , isRemote: Bool ) {
1854
1854
self . url = url
1855
1855
self . title = title
1856
1856
self . timestamp = timestamp
@@ -1904,7 +1904,7 @@ public struct FfiConverterTypeHistoryVisitInfo: FfiConverterRustBuffer {
1904
1904
url: FfiConverterTypeUrl . read ( from: & buf) ,
1905
1905
title: FfiConverterOptionString . read ( from: & buf) ,
1906
1906
timestamp: FfiConverterTypePlacesTimestamp . read ( from: & buf) ,
1907
- visitType: FfiConverterTypeVisitTransition . read ( from: & buf) ,
1907
+ visitType: FfiConverterTypeVisitType . read ( from: & buf) ,
1908
1908
isHidden: FfiConverterBool . read ( from: & buf) ,
1909
1909
previewImageUrl: FfiConverterOptionTypeUrl . read ( from: & buf) ,
1910
1910
isRemote: FfiConverterBool . read ( from: & buf)
@@ -1915,7 +1915,7 @@ public struct FfiConverterTypeHistoryVisitInfo: FfiConverterRustBuffer {
1915
1915
FfiConverterTypeUrl . write ( value. url, into: & buf)
1916
1916
FfiConverterOptionString . write ( value. title, into: & buf)
1917
1917
FfiConverterTypePlacesTimestamp . write ( value. timestamp, into: & buf)
1918
- FfiConverterTypeVisitTransition . write ( value. visitType, into: & buf)
1918
+ FfiConverterTypeVisitType . write ( value. visitType, into: & buf)
1919
1919
FfiConverterBool . write ( value. isHidden, into: & buf)
1920
1920
FfiConverterOptionTypeUrl . write ( value. previewImageUrl, into: & buf)
1921
1921
FfiConverterBool . write ( value. isRemote, into: & buf)
@@ -2426,7 +2426,7 @@ public func FfiConverterTypeTopFrecentSiteInfo_lower(_ value: TopFrecentSiteInfo
2426
2426
public struct VisitObservation {
2427
2427
public var url : Url
2428
2428
public var title : String ?
2429
- public var visitType : VisitTransition ?
2429
+ public var visitType : VisitType ?
2430
2430
public var isError : Bool ?
2431
2431
public var isRedirectSource : Bool ?
2432
2432
public var isPermanentRedirectSource : Bool ?
@@ -2437,7 +2437,7 @@ public struct VisitObservation {
2437
2437
2438
2438
// Default memberwise initializers are never public by default, so we
2439
2439
// declare one manually.
2440
- public init ( url: Url , title: String ? = nil , visitType: VisitTransition ? , isError: Bool ? = nil , isRedirectSource: Bool ? = nil , isPermanentRedirectSource: Bool ? = nil , at: PlacesTimestamp ? = nil , referrer: Url ? = nil , isRemote: Bool ? = nil , previewImageUrl: Url ? = nil ) {
2440
+ public init ( url: Url , title: String ? = nil , visitType: VisitType ? , isError: Bool ? = nil , isRedirectSource: Bool ? = nil , isPermanentRedirectSource: Bool ? = nil , at: PlacesTimestamp ? = nil , referrer: Url ? = nil , isRemote: Bool ? = nil , previewImageUrl: Url ? = nil ) {
2441
2441
self . url = url
2442
2442
self . title = title
2443
2443
self . visitType = visitType
@@ -2505,7 +2505,7 @@ public struct FfiConverterTypeVisitObservation: FfiConverterRustBuffer {
2505
2505
return try VisitObservation (
2506
2506
url: FfiConverterTypeUrl . read ( from: & buf) ,
2507
2507
title: FfiConverterOptionString . read ( from: & buf) ,
2508
- visitType: FfiConverterOptionTypeVisitTransition . read ( from: & buf) ,
2508
+ visitType: FfiConverterOptionTypeVisitType . read ( from: & buf) ,
2509
2509
isError: FfiConverterOptionBool . read ( from: & buf) ,
2510
2510
isRedirectSource: FfiConverterOptionBool . read ( from: & buf) ,
2511
2511
isPermanentRedirectSource: FfiConverterOptionBool . read ( from: & buf) ,
@@ -2519,7 +2519,7 @@ public struct FfiConverterTypeVisitObservation: FfiConverterRustBuffer {
2519
2519
public static func write( _ value: VisitObservation , into buf: inout [ UInt8 ] ) {
2520
2520
FfiConverterTypeUrl . write ( value. url, into: & buf)
2521
2521
FfiConverterOptionString . write ( value. title, into: & buf)
2522
- FfiConverterOptionTypeVisitTransition . write ( value. visitType, into: & buf)
2522
+ FfiConverterOptionTypeVisitType . write ( value. visitType, into: & buf)
2523
2523
FfiConverterOptionBool . write ( value. isError, into: & buf)
2524
2524
FfiConverterOptionBool . write ( value. isRedirectSource, into: & buf)
2525
2525
FfiConverterOptionBool . write ( value. isPermanentRedirectSource, into: & buf)
@@ -2972,7 +2972,7 @@ extension PlacesApiError: Error {}
2972
2972
2973
2973
// Note that we don't yet support `indirect` for enums.
2974
2974
// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
2975
- public enum VisitTransition {
2975
+ public enum VisitType {
2976
2976
case link
2977
2977
case typed
2978
2978
case bookmark
@@ -2982,12 +2982,13 @@ public enum VisitTransition {
2982
2982
case download
2983
2983
case framedLink
2984
2984
case reload
2985
+ case updatePlace
2985
2986
}
2986
2987
2987
- public struct FfiConverterTypeVisitTransition : FfiConverterRustBuffer {
2988
- typealias SwiftType = VisitTransition
2988
+ public struct FfiConverterTypeVisitType : FfiConverterRustBuffer {
2989
+ typealias SwiftType = VisitType
2989
2990
2990
- public static func read( from buf: inout ( data: Data , offset: Data . Index ) ) throws -> VisitTransition {
2991
+ public static func read( from buf: inout ( data: Data , offset: Data . Index ) ) throws -> VisitType {
2991
2992
let variant : Int32 = try readInt ( & buf)
2992
2993
switch variant {
2993
2994
case 1 : return . link
@@ -3008,11 +3009,13 @@ public struct FfiConverterTypeVisitTransition: FfiConverterRustBuffer {
3008
3009
3009
3010
case 9 : return . reload
3010
3011
3012
+ case 10 : return . updatePlace
3013
+
3011
3014
default : throw UniffiInternalError . unexpectedEnumCase
3012
3015
}
3013
3016
}
3014
3017
3015
- public static func write( _ value: VisitTransition , into buf: inout [ UInt8 ] ) {
3018
+ public static func write( _ value: VisitType , into buf: inout [ UInt8 ] ) {
3016
3019
switch value {
3017
3020
case . link:
3018
3021
writeInt ( & buf, Int32 ( 1 ) )
@@ -3040,19 +3043,22 @@ public struct FfiConverterTypeVisitTransition: FfiConverterRustBuffer {
3040
3043
3041
3044
case . reload:
3042
3045
writeInt ( & buf, Int32 ( 9 ) )
3046
+
3047
+ case . updatePlace:
3048
+ writeInt ( & buf, Int32 ( 10 ) )
3043
3049
}
3044
3050
}
3045
3051
}
3046
3052
3047
- public func FfiConverterTypeVisitTransition_lift ( _ buf: RustBuffer ) throws -> VisitTransition {
3048
- return try FfiConverterTypeVisitTransition . lift ( buf)
3053
+ public func FfiConverterTypeVisitType_lift ( _ buf: RustBuffer ) throws -> VisitType {
3054
+ return try FfiConverterTypeVisitType . lift ( buf)
3049
3055
}
3050
3056
3051
- public func FfiConverterTypeVisitTransition_lower ( _ value: VisitTransition ) -> RustBuffer {
3052
- return FfiConverterTypeVisitTransition . lower ( value)
3057
+ public func FfiConverterTypeVisitType_lower ( _ value: VisitType ) -> RustBuffer {
3058
+ return FfiConverterTypeVisitType . lower ( value)
3053
3059
}
3054
3060
3055
- extension VisitTransition : Equatable , Hashable { }
3061
+ extension VisitType : Equatable , Hashable { }
3056
3062
3057
3063
private struct FfiConverterOptionUInt32 : FfiConverterRustBuffer {
3058
3064
typealias SwiftType = UInt32 ?
@@ -3201,22 +3207,22 @@ private struct FfiConverterOptionTypeDocumentType: FfiConverterRustBuffer {
3201
3207
}
3202
3208
}
3203
3209
3204
- private struct FfiConverterOptionTypeVisitTransition : FfiConverterRustBuffer {
3205
- typealias SwiftType = VisitTransition ?
3210
+ private struct FfiConverterOptionTypeVisitType : FfiConverterRustBuffer {
3211
+ typealias SwiftType = VisitType ?
3206
3212
3207
3213
public static func write( _ value: SwiftType , into buf: inout [ UInt8 ] ) {
3208
3214
guard let value = value else {
3209
3215
writeInt ( & buf, Int8 ( 0 ) )
3210
3216
return
3211
3217
}
3212
3218
writeInt ( & buf, Int8 ( 1 ) )
3213
- FfiConverterTypeVisitTransition . write ( value, into: & buf)
3219
+ FfiConverterTypeVisitType . write ( value, into: & buf)
3214
3220
}
3215
3221
3216
3222
public static func read( from buf: inout ( data: Data , offset: Data . Index ) ) throws -> SwiftType {
3217
3223
switch try readInt ( & buf) as Int8 {
3218
3224
case 0 : return nil
3219
- case 1 : return try FfiConverterTypeVisitTransition . read ( from: & buf)
3225
+ case 1 : return try FfiConverterTypeVisitType . read ( from: & buf)
3220
3226
default : throw UniffiInternalError . unexpectedOptionalTag
3221
3227
}
3222
3228
}
0 commit comments