@@ -2730,7 +2730,7 @@ public enum Suggestion {
2730
2730
)
2731
2731
case amo( title: String , url: String , iconUrl: String , description: String , rating: String ? , numberOfRatings: Int64 , guid: String , score: Double
2732
2732
)
2733
- case yelp( url: String , title: String , icon: Data ? , iconMimetype: String ? , score: Double , hasLocationSign: Bool , subjectExactMatch: Bool , locationParam: String
2733
+ case yelp( url: String , title: String , icon: Data ? , iconMimetype: String ? , score: Double , hasLocationSign: Bool , subjectExactMatch: Bool , subjectType : YelpSubjectType , locationParam: String
2734
2734
)
2735
2735
case mdn( title: String , url: String , description: String , score: Double
2736
2736
)
@@ -2775,7 +2775,7 @@ public struct FfiConverterTypeSuggestion: FfiConverterRustBuffer {
2775
2775
case 4 : return . amo( title: try FfiConverterString . read ( from: & buf) , url: try FfiConverterString . read ( from: & buf) , iconUrl: try FfiConverterString . read ( from: & buf) , description: try FfiConverterString . read ( from: & buf) , rating: try FfiConverterOptionString . read ( from: & buf) , numberOfRatings: try FfiConverterInt64 . read ( from: & buf) , guid: try FfiConverterString . read ( from: & buf) , score: try FfiConverterDouble . read ( from: & buf)
2776
2776
)
2777
2777
2778
- case 5 : return . yelp( url: try FfiConverterString . read ( from: & buf) , title: try FfiConverterString . read ( from: & buf) , icon: try FfiConverterOptionData . read ( from: & buf) , iconMimetype: try FfiConverterOptionString . read ( from: & buf) , score: try FfiConverterDouble . read ( from: & buf) , hasLocationSign: try FfiConverterBool . read ( from: & buf) , subjectExactMatch: try FfiConverterBool . read ( from: & buf) , locationParam: try FfiConverterString . read ( from: & buf)
2778
+ case 5 : return . yelp( url: try FfiConverterString . read ( from: & buf) , title: try FfiConverterString . read ( from: & buf) , icon: try FfiConverterOptionData . read ( from: & buf) , iconMimetype: try FfiConverterOptionString . read ( from: & buf) , score: try FfiConverterDouble . read ( from: & buf) , hasLocationSign: try FfiConverterBool . read ( from: & buf) , subjectExactMatch: try FfiConverterBool . read ( from: & buf) , subjectType : try FfiConverterTypeYelpSubjectType . read ( from : & buf ) , locationParam: try FfiConverterString . read ( from: & buf)
2779
2779
)
2780
2780
2781
2781
case 6 : return . mdn( title: try FfiConverterString . read ( from: & buf) , url: try FfiConverterString . read ( from: & buf) , description: try FfiConverterString . read ( from: & buf) , score: try FfiConverterDouble . read ( from: & buf)
@@ -2845,7 +2845,7 @@ public struct FfiConverterTypeSuggestion: FfiConverterRustBuffer {
2845
2845
FfiConverterDouble . write ( score, into: & buf)
2846
2846
2847
2847
2848
- case let . yelp( url, title, icon, iconMimetype, score, hasLocationSign, subjectExactMatch, locationParam) :
2848
+ case let . yelp( url, title, icon, iconMimetype, score, hasLocationSign, subjectExactMatch, subjectType , locationParam) :
2849
2849
writeInt ( & buf, Int32 ( 5 ) )
2850
2850
FfiConverterString . write ( url, into: & buf)
2851
2851
FfiConverterString . write ( title, into: & buf)
@@ -2854,6 +2854,7 @@ public struct FfiConverterTypeSuggestion: FfiConverterRustBuffer {
2854
2854
FfiConverterDouble . write ( score, into: & buf)
2855
2855
FfiConverterBool . write ( hasLocationSign, into: & buf)
2856
2856
FfiConverterBool . write ( subjectExactMatch, into: & buf)
2857
+ FfiConverterTypeYelpSubjectType . write ( subjectType, into: & buf)
2857
2858
FfiConverterString . write ( locationParam, into: & buf)
2858
2859
2859
2860
@@ -3039,6 +3040,76 @@ extension SuggestionProvider: Equatable, Hashable {}
3039
3040
3040
3041
3041
3042
3043
+ // Note that we don't yet support `indirect` for enums.
3044
+ // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
3045
+ /**
3046
+ * Subject type for Yelp suggestion.
3047
+ */
3048
+
3049
+ public enum YelpSubjectType : UInt8 {
3050
+
3051
+ case service = 0
3052
+ case business = 1
3053
+ }
3054
+
3055
+
3056
+ #if compiler(>=6)
3057
+ extension YelpSubjectType : Sendable { }
3058
+ #endif
3059
+
3060
+ #if swift(>=5.8)
3061
+ @_documentation ( visibility: private)
3062
+ #endif
3063
+ public struct FfiConverterTypeYelpSubjectType : FfiConverterRustBuffer {
3064
+ typealias SwiftType = YelpSubjectType
3065
+
3066
+ public static func read( from buf: inout ( data: Data , offset: Data . Index ) ) throws -> YelpSubjectType {
3067
+ let variant : Int32 = try readInt ( & buf)
3068
+ switch variant {
3069
+
3070
+ case 1 : return . service
3071
+
3072
+ case 2 : return . business
3073
+
3074
+ default : throw UniffiInternalError . unexpectedEnumCase
3075
+ }
3076
+ }
3077
+
3078
+ public static func write( _ value: YelpSubjectType , into buf: inout [ UInt8 ] ) {
3079
+ switch value {
3080
+
3081
+
3082
+ case . service:
3083
+ writeInt ( & buf, Int32 ( 1 ) )
3084
+
3085
+
3086
+ case . business:
3087
+ writeInt ( & buf, Int32 ( 2 ) )
3088
+
3089
+ }
3090
+ }
3091
+ }
3092
+
3093
+
3094
+ #if swift(>=5.8)
3095
+ @_documentation ( visibility: private)
3096
+ #endif
3097
+ public func FfiConverterTypeYelpSubjectType_lift( _ buf: RustBuffer ) throws -> YelpSubjectType {
3098
+ return try FfiConverterTypeYelpSubjectType . lift ( buf)
3099
+ }
3100
+
3101
+ #if swift(>=5.8)
3102
+ @_documentation ( visibility: private)
3103
+ #endif
3104
+ public func FfiConverterTypeYelpSubjectType_lower( _ value: YelpSubjectType ) -> RustBuffer {
3105
+ return FfiConverterTypeYelpSubjectType . lower ( value)
3106
+ }
3107
+
3108
+
3109
+ extension YelpSubjectType : Equatable , Hashable { }
3110
+
3111
+
3112
+
3042
3113
#if swift(>=5.8)
3043
3114
@_documentation ( visibility: private)
3044
3115
#endif
0 commit comments