fune/third_party/rust/suggest/src/lib.rs
Lina Butler 1466383668 Bug 1851845 - Update vendored Application Services dependencies. r=markh,adw
This commit vendors the latest changes to the Suggest and Remote
Settings Rust components.

1. From the `application-services` source tree, I ran
   `./tools/update-moz-central-vendoring.py ../m-c` to update the
   revisions in the m-c source tree.
2. I added the Remote Settings component UDL file to
   `toolkit/components/uniffi-bindgen-gecko-js/mach_commands.py`, and
   updated `toolkit/components/uniffi-bindgen-gecko-js/config.toml` to
   call the `RemoteSettings` constructor on the main thread. The
   Suggest component uses the `RemoteSettingsConfig` type in its
   public API, so we must generate bindings for the Remote Settings
   component.
3. From the m-c source tree, I ran `./mach uniffi generate` to update
   the generated UniFFI bindings.

Differential Revision: https://phabricator.services.mozilla.com/D187559
2023-09-07 05:40:28 +00:00

32 lines
903 B
Rust

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
use remote_settings::RemoteSettingsConfig;
mod db;
mod error;
mod keyword;
mod provider;
mod rs;
mod schema;
mod store;
mod suggestion;
pub use error::SuggestApiError;
pub use provider::SuggestionProvider;
pub use store::{SuggestIngestionConstraints, SuggestStore};
pub use suggestion::Suggestion;
pub(crate) type Result<T> = std::result::Result<T, error::Error>;
pub type SuggestApiResult<T> = std::result::Result<T, error::SuggestApiError>;
/// A query for suggestions to show in the address bar.
#[derive(Debug, Default)]
pub struct SuggestionQuery {
pub keyword: String,
pub include_sponsored: bool,
pub include_non_sponsored: bool,
}
uniffi::include_scaffolding!("suggest");