@@ -1790,7 +1790,18 @@ extension SuggestApiError: Foundation.LocalizedError {
1790
1790
1791
1791
public enum SuggestProviderConfig {
1792
1792
1793
- case weather( minKeywordLength: Int32
1793
+ case weather(
1794
+ /**
1795
+ * Weather suggestion score.
1796
+ */score: Double ,
1797
+ /**
1798
+ * Threshold for weather keyword prefix matching when a weather keyword
1799
+ * is the first term in a query. Zero means prefix matching is disabled
1800
+ * and weather keywords must be typed in full when they are first in
1801
+ * the query. (Ideally this would be an `Option` and `None` would mean
1802
+ * full keywords are required, but it's probably not worth the breaking
1803
+ * API change.) This threshold does not apply to city and region names.
1804
+ */minKeywordLength: Int32
1794
1805
)
1795
1806
}
1796
1807
@@ -1805,7 +1816,7 @@ public struct FfiConverterTypeSuggestProviderConfig: FfiConverterRustBuffer {
1805
1816
let variant : Int32 = try readInt ( & buf)
1806
1817
switch variant {
1807
1818
1808
- case 1 : return . weather( minKeywordLength: try FfiConverterInt32 . read ( from: & buf)
1819
+ case 1 : return . weather( score : try FfiConverterDouble . read ( from : & buf ) , minKeywordLength: try FfiConverterInt32 . read ( from: & buf)
1809
1820
)
1810
1821
1811
1822
default : throw UniffiInternalError . unexpectedEnumCase
@@ -1816,8 +1827,9 @@ public struct FfiConverterTypeSuggestProviderConfig: FfiConverterRustBuffer {
1816
1827
switch value {
1817
1828
1818
1829
1819
- case let . weather( minKeywordLength) :
1830
+ case let . weather( score , minKeywordLength) :
1820
1831
writeInt ( & buf, Int32 ( 1 ) )
1832
+ FfiConverterDouble . write ( score, into: & buf)
1821
1833
FfiConverterInt32 . write ( minKeywordLength, into: & buf)
1822
1834
1823
1835
}
@@ -1865,7 +1877,7 @@ public enum Suggestion {
1865
1877
)
1866
1878
case mdn( title: String , url: String , description: String , score: Double
1867
1879
)
1868
- case weather( score: Double
1880
+ case weather( city : String ? , region : String ? , score: Double
1869
1881
)
1870
1882
case fakespot( fakespotGrade: String , productId: String , rating: Double , title: String , totalReviews: Int64 , url: String , icon: Data ? , iconMimetype: String ? , score: Double
1871
1883
)
@@ -1902,7 +1914,7 @@ public struct FfiConverterTypeSuggestion: FfiConverterRustBuffer {
1902
1914
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)
1903
1915
)
1904
1916
1905
- case 7 : return . weather( score: try FfiConverterDouble . read ( from: & buf)
1917
+ case 7 : return . weather( city : try FfiConverterOptionString . read ( from : & buf ) , region : try FfiConverterOptionString . read ( from : & buf ) , score: try FfiConverterDouble . read ( from: & buf)
1906
1918
)
1907
1919
1908
1920
case 8 : return . fakespot( fakespotGrade: try FfiConverterString . read ( from: & buf) , productId: try FfiConverterString . read ( from: & buf) , rating: try FfiConverterDouble . read ( from: & buf) , title: try FfiConverterString . read ( from: & buf) , totalReviews: try FfiConverterInt64 . read ( from: & buf) , url: try FfiConverterString . read ( from: & buf) , icon: try FfiConverterOptionData . read ( from: & buf) , iconMimetype: try FfiConverterOptionString . read ( from: & buf) , score: try FfiConverterDouble . read ( from: & buf)
@@ -1985,8 +1997,10 @@ public struct FfiConverterTypeSuggestion: FfiConverterRustBuffer {
1985
1997
FfiConverterDouble . write ( score, into: & buf)
1986
1998
1987
1999
1988
- case let . weather( score) :
2000
+ case let . weather( city , region , score) :
1989
2001
writeInt ( & buf, Int32 ( 7 ) )
2002
+ FfiConverterOptionString . write ( city, into: & buf)
2003
+ FfiConverterOptionString . write ( region, into: & buf)
1990
2004
FfiConverterDouble . write ( score, into: & buf)
1991
2005
1992
2006
0 commit comments