Copy as Markdown

Other Tools

// This file was autogenerated by some hot garbage in the `uniffi` crate.
// Trust me, you don't want to mess with it!
::uniffi::setup_scaffolding!("suggest");
/// Export info about the UDL while used to create us
/// See `uniffi_bindgen::macro_metadata` for how this is used.
// ditto for info about the UDL which spawned us.
const UNIFFI_META_CONST_UDL_SUGGEST: ::uniffi::MetadataBuffer = ::uniffi::MetadataBuffer::from_code(::uniffi::metadata::codes::UDL_FILE)
.concat_str("suggest")
.concat_str("suggest")
.concat_str("suggest");
#[doc(hidden)]
#[no_mangle]
pub static UNIFFI_META_UDL_SUGGEST: [u8; UNIFFI_META_CONST_UDL_SUGGEST.size] = UNIFFI_META_CONST_UDL_SUGGEST.into_array();
// Error definitions, corresponding to `error` in the UDL.
#[::uniffi::derive_error_for_udl(
)]
enum r#SuggestApiError {
r#Interrupted {
},
r#Backoff {
r#seconds: u64,
},
r#Network {
r#reason: String,
},
r#Other {
r#reason: String,
},
}
// Enum definitions, corresponding to `enum` in UDL.
#[::uniffi::derive_enum_for_udl(
)]
enum r#SuggestProviderConfig {
r#Weather {
r#min_keyword_length: i32,
},
}
// Enum definitions, corresponding to `enum` in UDL.
#[::uniffi::derive_enum_for_udl(
)]
enum r#Suggestion {
r#Amp {
r#title: String,
r#url: String,
r#raw_url: String,
r#icon: std::option::Option<std::vec::Vec<u8>>,
r#icon_mimetype: std::option::Option<String>,
r#full_keyword: String,
r#block_id: i64,
r#advertiser: String,
r#iab_category: String,
r#impression_url: String,
r#click_url: String,
r#raw_click_url: String,
r#score: f64,
},
r#Pocket {
r#title: String,
r#url: String,
r#score: f64,
r#is_top_pick: bool,
},
r#Wikipedia {
r#title: String,
r#url: String,
r#icon: std::option::Option<std::vec::Vec<u8>>,
r#icon_mimetype: std::option::Option<String>,
r#full_keyword: String,
},
r#Amo {
r#title: String,
r#url: String,
r#icon_url: String,
r#description: String,
r#rating: std::option::Option<String>,
r#number_of_ratings: i64,
r#guid: String,
r#score: f64,
},
r#Yelp {
r#url: String,
r#title: String,
r#icon: std::option::Option<std::vec::Vec<u8>>,
r#icon_mimetype: std::option::Option<String>,
r#score: f64,
r#has_location_sign: bool,
r#subject_exact_match: bool,
r#location_param: String,
},
r#Mdn {
r#title: String,
r#url: String,
r#description: String,
r#score: f64,
},
r#Weather {
r#score: f64,
},
}
// Enum definitions, corresponding to `enum` in UDL.
#[::uniffi::derive_enum_for_udl(
)]
enum r#SuggestionProvider {
r#Amp {
},
r#Pocket {
},
r#Wikipedia {
},
r#Amo {
},
r#Yelp {
},
r#Mdn {
},
r#Weather {
},
r#AmpMobile {
},
}
// Record definitions, implemented as method-less structs, corresponding to `dictionary` objects.
#[::uniffi::derive_record_for_udl]
struct r#SuggestGlobalConfig {
r#show_less_frequently_cap: i32,
}
#[::uniffi::derive_record_for_udl]
struct r#SuggestIngestionConstraints {
r#max_suggestions: std::option::Option<u64>,
r#providers: std::option::Option<std::vec::Vec<r#SuggestionProvider>>,
r#empty_only: bool,
}
#[::uniffi::derive_record_for_udl]
struct r#SuggestionQuery {
r#keyword: String,
r#providers: std::vec::Vec<r#SuggestionProvider>,
r#limit: std::option::Option<i32>,
}
// Top level functions, corresponding to UDL `namespace` functions.
#[::uniffi::export_for_udl]
pub fn r#raw_suggestion_url_matches(
r#raw_url: &String,
r#url: &String,
) -> bool
{
unreachable!()
}
// Object definitions, corresponding to UDL `interface` definitions.
#[::uniffi::derive_object_for_udl]
struct r#SuggestStore { }
#[::uniffi::export_for_udl]
impl r#SuggestStore {
#[uniffi::constructor]
pub fn r#new(
r#path: &String,
r#settings_config: std::option::Option<r#RemoteSettingsConfig>,
) -> ::std::result::Result::<std::sync::Arc<r#SuggestStore>, r#SuggestApiError>
{
unreachable!()
}
}
#[::uniffi::export_for_udl]
impl r#SuggestStore {
pub fn r#clear(
&self,
) -> ::std::result::Result::<(), r#SuggestApiError>
{
unreachable!()
}
}
#[::uniffi::export_for_udl]
impl r#SuggestStore {
pub fn r#clear_dismissed_suggestions(
&self,
) -> ::std::result::Result::<(), r#SuggestApiError>
{
unreachable!()
}
}
#[::uniffi::export_for_udl]
impl r#SuggestStore {
pub fn r#dismiss_suggestion(
&self,
r#raw_suggestion_url: String,
) -> ::std::result::Result::<(), r#SuggestApiError>
{
unreachable!()
}
}
#[::uniffi::export_for_udl]
impl r#SuggestStore {
pub fn r#fetch_global_config(
&self,
) -> ::std::result::Result::<r#SuggestGlobalConfig, r#SuggestApiError>
{
unreachable!()
}
}
#[::uniffi::export_for_udl]
impl r#SuggestStore {
pub fn r#fetch_provider_config(
&self,
r#provider: r#SuggestionProvider,
) -> ::std::result::Result::<std::option::Option<r#SuggestProviderConfig>, r#SuggestApiError>
{
unreachable!()
}
}
#[::uniffi::export_for_udl]
impl r#SuggestStore {
pub fn r#ingest(
&self,
r#constraints: r#SuggestIngestionConstraints,
) -> ::std::result::Result::<(), r#SuggestApiError>
{
unreachable!()
}
}
#[::uniffi::export_for_udl]
impl r#SuggestStore {
pub fn r#interrupt(
&self,
)
{
unreachable!()
}
}
#[::uniffi::export_for_udl]
impl r#SuggestStore {
pub fn r#query(
&self,
r#query: r#SuggestionQuery,
) -> ::std::result::Result::<std::vec::Vec<r#Suggestion>, r#SuggestApiError>
{
unreachable!()
}
}
#[::uniffi::derive_object_for_udl]
struct r#SuggestStoreBuilder { }
#[::uniffi::export_for_udl]
impl r#SuggestStoreBuilder {
#[uniffi::constructor]
pub fn r#new(
) -> std::sync::Arc<r#SuggestStoreBuilder>
{
unreachable!()
}
}
#[::uniffi::export_for_udl]
impl r#SuggestStoreBuilder {
pub fn r#build(
&self,
) -> ::std::result::Result::<std::sync::Arc<r#SuggestStore>, r#SuggestApiError>
{
unreachable!()
}
}
#[::uniffi::export_for_udl]
impl r#SuggestStoreBuilder {
pub fn r#cache_path(
self: Arc<Self>,
r#path: String,
) -> std::sync::Arc<r#SuggestStoreBuilder>
{
unreachable!()
}
}
#[::uniffi::export_for_udl]
impl r#SuggestStoreBuilder {
pub fn r#data_path(
self: Arc<Self>,
r#path: String,
) -> std::sync::Arc<r#SuggestStoreBuilder>
{
unreachable!()
}
}
#[::uniffi::export_for_udl]
impl r#SuggestStoreBuilder {
pub fn r#remote_settings_config(
self: Arc<Self>,
r#config: r#RemoteSettingsConfig,
) -> std::sync::Arc<r#SuggestStoreBuilder>
{
unreachable!()
}
}
#[::uniffi::export_for_udl]
impl r#SuggestStoreBuilder {
pub fn r#remote_settings_server(
self: Arc<Self>,
r#server: r#RemoteSettingsServer,
) -> std::sync::Arc<r#SuggestStoreBuilder>
{
unreachable!()
}
}
// Callback Interface definitions, corresponding to UDL `callback interface` definitions.
// External and Wrapped types
// Support for external types.
// Types with an external `FfiConverter`...
// The FfiConverter for `RemoteSettingsConfig` is defined in `remote_settings`
// If it has its existing FfiConverter defined with a UniFFITag, it needs forwarding.
::uniffi::ffi_converter_forward!(r#RemoteSettingsConfig, ::r#remote_settings::UniFfiTag, crate::UniFfiTag);
// The FfiConverter for `RemoteSettingsServer` is defined in `remote_settings`
// If it has its existing FfiConverter defined with a UniFFITag, it needs forwarding.
::uniffi::ffi_converter_forward!(r#RemoteSettingsServer, ::r#remote_settings::UniFfiTag, crate::UniFfiTag);
// We generate support for each Custom Type and the builtin type it uses.
// Export scaffolding checksums for UDL items
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_suggest_checksum_func_raw_suggestion_url_matches() -> u16 {
43507
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_suggest_checksum_method_suggeststore_clear() -> u16 {
13979
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_suggest_checksum_method_suggeststore_clear_dismissed_suggestions() -> u16 {
21145
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_suggest_checksum_method_suggeststore_dismiss_suggestion() -> u16 {
28358
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_suggest_checksum_method_suggeststore_fetch_global_config() -> u16 {
41044
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_suggest_checksum_method_suggeststore_fetch_provider_config() -> u16 {
5906
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_suggest_checksum_method_suggeststore_ingest() -> u16 {
4478
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_suggest_checksum_method_suggeststore_interrupt() -> u16 {
11751
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_suggest_checksum_method_suggeststore_query() -> u16 {
12875
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_suggest_checksum_method_suggeststorebuilder_build() -> u16 {
28243
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_suggest_checksum_method_suggeststorebuilder_cache_path() -> u16 {
30962
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_suggest_checksum_method_suggeststorebuilder_data_path() -> u16 {
50155
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_suggest_checksum_method_suggeststorebuilder_remote_settings_config() -> u16 {
33678
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_suggest_checksum_method_suggeststorebuilder_remote_settings_server() -> u16 {
22023
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_suggest_checksum_constructor_suggeststore_new() -> u16 {
37533
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_suggest_checksum_constructor_suggeststorebuilder_new() -> u16 {
60163
}