Bug 1893189 - Vendor the latest (2024-04-24) A-S into mozilla-central r=bdk

Differential Revision: https://phabricator.services.mozilla.com/D208509
This commit is contained in:
Nan Jiang 2024-04-29 18:24:40 +00:00
parent 8273373e0d
commit 13d20c9b90
53 changed files with 1549 additions and 879 deletions

View file

@ -60,9 +60,9 @@ git = "https://github.com/mozilla-spidermonkey/jsparagus"
rev = "61f399c53a641ebd3077c1f39f054f6d396a633c" rev = "61f399c53a641ebd3077c1f39f054f6d396a633c"
replace-with = "vendored-sources" replace-with = "vendored-sources"
[source."git+https://github.com/mozilla/application-services?rev=e6ccfed09ebe663f464a33968f42e656c152e584"] [source."git+https://github.com/mozilla/application-services?rev=bf37a5174a1dcb7a890dc35386d58f9b77f82434"]
git = "https://github.com/mozilla/application-services" git = "https://github.com/mozilla/application-services"
rev = "e6ccfed09ebe663f464a33968f42e656c152e584" rev = "bf37a5174a1dcb7a890dc35386d58f9b77f82434"
replace-with = "vendored-sources" replace-with = "vendored-sources"
[source."git+https://github.com/mozilla/audioipc?rev=409e11f8de6288e9ddfe269654523735302e59e6"] [source."git+https://github.com/mozilla/audioipc?rev=409e11f8de6288e9ddfe269654523735302e59e6"]

29
Cargo.lock generated
View file

@ -1657,7 +1657,7 @@ dependencies = [
[[package]] [[package]]
name = "error-support" name = "error-support"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/mozilla/application-services?rev=e6ccfed09ebe663f464a33968f42e656c152e584#e6ccfed09ebe663f464a33968f42e656c152e584" source = "git+https://github.com/mozilla/application-services?rev=bf37a5174a1dcb7a890dc35386d58f9b77f82434#bf37a5174a1dcb7a890dc35386d58f9b77f82434"
dependencies = [ dependencies = [
"error-support-macros", "error-support-macros",
"lazy_static", "lazy_static",
@ -1669,7 +1669,7 @@ dependencies = [
[[package]] [[package]]
name = "error-support-macros" name = "error-support-macros"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/mozilla/application-services?rev=e6ccfed09ebe663f464a33968f42e656c152e584#e6ccfed09ebe663f464a33968f42e656c152e584" source = "git+https://github.com/mozilla/application-services?rev=bf37a5174a1dcb7a890dc35386d58f9b77f82434#bf37a5174a1dcb7a890dc35386d58f9b77f82434"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -2937,11 +2937,12 @@ dependencies = [
[[package]] [[package]]
name = "interrupt-support" name = "interrupt-support"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/mozilla/application-services?rev=e6ccfed09ebe663f464a33968f42e656c152e584#e6ccfed09ebe663f464a33968f42e656c152e584" source = "git+https://github.com/mozilla/application-services?rev=bf37a5174a1dcb7a890dc35386d58f9b77f82434#bf37a5174a1dcb7a890dc35386d58f9b77f82434"
dependencies = [ dependencies = [
"lazy_static", "lazy_static",
"parking_lot", "parking_lot",
"rusqlite", "rusqlite",
"uniffi",
] ]
[[package]] [[package]]
@ -4134,7 +4135,7 @@ dependencies = [
[[package]] [[package]]
name = "nss_build_common" name = "nss_build_common"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/mozilla/application-services?rev=e6ccfed09ebe663f464a33968f42e656c152e584#e6ccfed09ebe663f464a33968f42e656c152e584" source = "git+https://github.com/mozilla/application-services?rev=bf37a5174a1dcb7a890dc35386d58f9b77f82434#bf37a5174a1dcb7a890dc35386d58f9b77f82434"
[[package]] [[package]]
name = "nsstring" name = "nsstring"
@ -4809,9 +4810,10 @@ checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da"
[[package]] [[package]]
name = "relevancy" name = "relevancy"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/mozilla/application-services?rev=e6ccfed09ebe663f464a33968f42e656c152e584#e6ccfed09ebe663f464a33968f42e656c152e584" source = "git+https://github.com/mozilla/application-services?rev=bf37a5174a1dcb7a890dc35386d58f9b77f82434#bf37a5174a1dcb7a890dc35386d58f9b77f82434"
dependencies = [ dependencies = [
"error-support", "error-support",
"interrupt-support",
"log", "log",
"md-5", "md-5",
"parking_lot", "parking_lot",
@ -4825,7 +4827,7 @@ dependencies = [
[[package]] [[package]]
name = "remote_settings" name = "remote_settings"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/mozilla/application-services?rev=e6ccfed09ebe663f464a33968f42e656c152e584#e6ccfed09ebe663f464a33968f42e656c152e584" source = "git+https://github.com/mozilla/application-services?rev=bf37a5174a1dcb7a890dc35386d58f9b77f82434#bf37a5174a1dcb7a890dc35386d58f9b77f82434"
dependencies = [ dependencies = [
"parking_lot", "parking_lot",
"serde", "serde",
@ -5354,13 +5356,14 @@ dependencies = [
[[package]] [[package]]
name = "sql-support" name = "sql-support"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/mozilla/application-services?rev=e6ccfed09ebe663f464a33968f42e656c152e584#e6ccfed09ebe663f464a33968f42e656c152e584" source = "git+https://github.com/mozilla/application-services?rev=bf37a5174a1dcb7a890dc35386d58f9b77f82434#bf37a5174a1dcb7a890dc35386d58f9b77f82434"
dependencies = [ dependencies = [
"ffi-support", "ffi-support",
"interrupt-support", "interrupt-support",
"lazy_static", "lazy_static",
"log", "log",
"nss_build_common", "nss_build_common",
"parking_lot",
"rusqlite", "rusqlite",
"tempfile", "tempfile",
"thiserror", "thiserror",
@ -5535,7 +5538,7 @@ checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc"
[[package]] [[package]]
name = "suggest" name = "suggest"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/mozilla/application-services?rev=e6ccfed09ebe663f464a33968f42e656c152e584#e6ccfed09ebe663f464a33968f42e656c152e584" source = "git+https://github.com/mozilla/application-services?rev=bf37a5174a1dcb7a890dc35386d58f9b77f82434#bf37a5174a1dcb7a890dc35386d58f9b77f82434"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"chrono", "chrono",
@ -5584,7 +5587,7 @@ dependencies = [
[[package]] [[package]]
name = "sync-guid" name = "sync-guid"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/mozilla/application-services?rev=e6ccfed09ebe663f464a33968f42e656c152e584#e6ccfed09ebe663f464a33968f42e656c152e584" source = "git+https://github.com/mozilla/application-services?rev=bf37a5174a1dcb7a890dc35386d58f9b77f82434#bf37a5174a1dcb7a890dc35386d58f9b77f82434"
dependencies = [ dependencies = [
"base64 0.21.3", "base64 0.21.3",
"rand", "rand",
@ -5595,7 +5598,7 @@ dependencies = [
[[package]] [[package]]
name = "sync15" name = "sync15"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/mozilla/application-services?rev=e6ccfed09ebe663f464a33968f42e656c152e584#e6ccfed09ebe663f464a33968f42e656c152e584" source = "git+https://github.com/mozilla/application-services?rev=bf37a5174a1dcb7a890dc35386d58f9b77f82434#bf37a5174a1dcb7a890dc35386d58f9b77f82434"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"error-support", "error-support",
@ -5627,7 +5630,7 @@ dependencies = [
[[package]] [[package]]
name = "tabs" name = "tabs"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/mozilla/application-services?rev=e6ccfed09ebe663f464a33968f42e656c152e584#e6ccfed09ebe663f464a33968f42e656c152e584" source = "git+https://github.com/mozilla/application-services?rev=bf37a5174a1dcb7a890dc35386d58f9b77f82434#bf37a5174a1dcb7a890dc35386d58f9b77f82434"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"error-support", "error-support",
@ -6300,7 +6303,7 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
[[package]] [[package]]
name = "viaduct" name = "viaduct"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/mozilla/application-services?rev=e6ccfed09ebe663f464a33968f42e656c152e584#e6ccfed09ebe663f464a33968f42e656c152e584" source = "git+https://github.com/mozilla/application-services?rev=bf37a5174a1dcb7a890dc35386d58f9b77f82434#bf37a5174a1dcb7a890dc35386d58f9b77f82434"
dependencies = [ dependencies = [
"ffi-support", "ffi-support",
"log", "log",
@ -6448,7 +6451,7 @@ dependencies = [
[[package]] [[package]]
name = "webext-storage" name = "webext-storage"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/mozilla/application-services?rev=e6ccfed09ebe663f464a33968f42e656c152e584#e6ccfed09ebe663f464a33968f42e656c152e584" source = "git+https://github.com/mozilla/application-services?rev=bf37a5174a1dcb7a890dc35386d58f9b77f82434#bf37a5174a1dcb7a890dc35386d58f9b77f82434"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"error-support", "error-support",

View file

@ -209,14 +209,14 @@ warp = { git = "https://github.com/seanmonstar/warp", rev = "9d081461ae1167eb321
malloc_size_of_derive = { path = "xpcom/rust/malloc_size_of_derive" } malloc_size_of_derive = { path = "xpcom/rust/malloc_size_of_derive" }
# application-services overrides to make updating them all simpler. # application-services overrides to make updating them all simpler.
interrupt-support = { git = "https://github.com/mozilla/application-services", rev = "e6ccfed09ebe663f464a33968f42e656c152e584" } interrupt-support = { git = "https://github.com/mozilla/application-services", rev = "bf37a5174a1dcb7a890dc35386d58f9b77f82434" }
relevancy = { git = "https://github.com/mozilla/application-services", rev = "e6ccfed09ebe663f464a33968f42e656c152e584" } relevancy = { git = "https://github.com/mozilla/application-services", rev = "bf37a5174a1dcb7a890dc35386d58f9b77f82434" }
sql-support = { git = "https://github.com/mozilla/application-services", rev = "e6ccfed09ebe663f464a33968f42e656c152e584" } sql-support = { git = "https://github.com/mozilla/application-services", rev = "bf37a5174a1dcb7a890dc35386d58f9b77f82434" }
suggest = { git = "https://github.com/mozilla/application-services", rev = "e6ccfed09ebe663f464a33968f42e656c152e584" } suggest = { git = "https://github.com/mozilla/application-services", rev = "bf37a5174a1dcb7a890dc35386d58f9b77f82434" }
sync15 = { git = "https://github.com/mozilla/application-services", rev = "e6ccfed09ebe663f464a33968f42e656c152e584" } sync15 = { git = "https://github.com/mozilla/application-services", rev = "bf37a5174a1dcb7a890dc35386d58f9b77f82434" }
tabs = { git = "https://github.com/mozilla/application-services", rev = "e6ccfed09ebe663f464a33968f42e656c152e584" } tabs = { git = "https://github.com/mozilla/application-services", rev = "bf37a5174a1dcb7a890dc35386d58f9b77f82434" }
viaduct = { git = "https://github.com/mozilla/application-services", rev = "e6ccfed09ebe663f464a33968f42e656c152e584" } viaduct = { git = "https://github.com/mozilla/application-services", rev = "bf37a5174a1dcb7a890dc35386d58f9b77f82434" }
webext-storage = { git = "https://github.com/mozilla/application-services", rev = "e6ccfed09ebe663f464a33968f42e656c152e584" } webext-storage = { git = "https://github.com/mozilla/application-services", rev = "bf37a5174a1dcb7a890dc35386d58f9b77f82434" }
# Patch mio 0.8.8 to use windows-sys 0.52 (backport https://github.com/tokio-rs/mio/commit/eea9e3e0c469480e5c59c01e6c3c7e5fd88f0848) # Patch mio 0.8.8 to use windows-sys 0.52 (backport https://github.com/tokio-rs/mio/commit/eea9e3e0c469480e5c59c01e6c3c7e5fd88f0848)
mio_0_8 = { package = "mio", git = "https://github.com/glandium/mio", rev = "9a2ef335c366044ffe73b1c4acabe50a1daefe05" } mio_0_8 = { package = "mio", git = "https://github.com/glandium/mio", rev = "9a2ef335c366044ffe73b1c4acabe50a1daefe05" }

View file

@ -1 +1 @@
{"files":{"Cargo.toml":"c2ca168a6ba35961681f351e010d21696d8779ddac06436338431bd39ed16ebb","README.md":"7f1418b4a7c138ba20bcaea077fe6cf0d6ffbaf6df6b90c80efc52aa0d0e2e9f","src/error.rs":"b83cbe8abd22a9d687508d236a2a77e28b3fc6c39673633e5820cc0e3fc86cba","src/interruptee.rs":"c56f9ac610d0b24a128a907266432287558c4b73f6c24b82674ca7894181d18f","src/lib.rs":"cf44a84310913be5264e1c4a3e004a9f7a6cd82d01a109bb6ac4d6002b5dd560","src/shutdown.rs":"b9dfdb717932301035001a0398967384f1b993e14505860415d023febbe82d63","src/sql.rs":"7e050313884a281e6b3fc7a4514374e08cb9e5f3c5aefb873be92e56f30af660"},"package":null} {"files":{"Cargo.toml":"f31bc542c5a3e5dfe82a7c62fa4a0a3e5b56424b77eb7ad913aa322e5e070c60","README.md":"7f1418b4a7c138ba20bcaea077fe6cf0d6ffbaf6df6b90c80efc52aa0d0e2e9f","build.rs":"49840f26c73c5db19cb4e7f02930e49d7a19648168b83f2313ac1a0303c103df","src/error.rs":"b83cbe8abd22a9d687508d236a2a77e28b3fc6c39673633e5820cc0e3fc86cba","src/interrupt_support.udl":"5472e585280576de4fab587278e6e24cc26a7c74e0489aeef3c41671c768f662","src/interruptee.rs":"c56f9ac610d0b24a128a907266432287558c4b73f6c24b82674ca7894181d18f","src/lib.rs":"cf44a84310913be5264e1c4a3e004a9f7a6cd82d01a109bb6ac4d6002b5dd560","src/shutdown.rs":"881a358b053fdd01b56b59864547b6456625dea4ee311b2e0ed3762009516ce6","src/sql.rs":"ba04479f740a25310fd171a473b9870580ad9f02bb2f1109c0171694cad4c2cd"},"package":null}

View file

@ -20,6 +20,7 @@ license = "MPL-2.0"
[dependencies] [dependencies]
lazy_static = "1.4" lazy_static = "1.4"
parking_lot = ">=0.11,<=0.12" parking_lot = ">=0.11,<=0.12"
uniffi = "0.27.1"
[dependencies.rusqlite] [dependencies.rusqlite]
version = "0.30.0" version = "0.30.0"
@ -29,3 +30,7 @@ features = [
"bundled", "bundled",
"unlock_notify", "unlock_notify",
] ]
[build-dependencies.uniffi]
version = "0.27.1"
features = ["build"]

View file

@ -0,0 +1,8 @@
/* 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/.
*/
fn main() {
uniffi::generate_scaffolding("./src/interrupt_support.udl").unwrap();
}

View file

@ -0,0 +1,5 @@
namespace interrupt_support {
// Enter shutdown mode, causing all current and future interruptable operations to be interrupted.
void shutdown();
};

View file

@ -12,13 +12,14 @@ License, v. 2.0. If a copy of the MPL was not distributed with this
/// ///
/// Here's how add shutdown support to a component: /// Here's how add shutdown support to a component:
/// ///
/// - Use `SqlInterruptScope::new_with_shutdown_check()` to create a new
/// `SqlInterruptScope`
/// - Database connections need to be wrapped in a type that: /// - Database connections need to be wrapped in a type that:
/// - Implements `AsRef<SqlInterruptHandle>`. /// - Implements `AsRef<SqlInterruptHandle>`.
/// - Gets wrapped in an `Arc<>`. This is needed so the shutdown code can get a weak reference to /// - Gets wrapped in an `Arc<>`. This is needed so the shutdown code can get a weak reference to
/// the instance. /// the instance.
/// - Calls `register_interrupt()` on creation /// - Calls `register_interrupt()` on creation
/// - Use `SqlInterruptScope::begin_interrupt_scope()` before each operation.
/// This will return an error if shutdown mode is in effect.
/// The interrupt scope should be periodically checked to handle the operation being interrupted/shutdown after it started.
/// ///
/// See `PlacesDb::begin_interrupt_scope()` and `PlacesApi::new_connection()` for an example of /// See `PlacesDb::begin_interrupt_scope()` and `PlacesApi::new_connection()` for an example of
/// how this works. /// how this works.

View file

@ -120,3 +120,10 @@ impl Interruptee for SqlInterruptScope {
self.was_interrupted() self.was_interrupted()
} }
} }
// Needed to allow Weak<SqlInterruptHandle> to be passed to `interrupt::register_interrupt`
impl AsRef<SqlInterruptHandle> for SqlInterruptHandle {
fn as_ref(&self) -> &SqlInterruptHandle {
self
}
}

View file

@ -1 +1 @@
{"files":{"Cargo.toml":"76d64a839128f51662d1c10728ceddbb6a9ebdfce803915874cd654117d1b14e","build.rs":"a562bfe527d21c4e8a1a44b892defa83cdff141ec5dd51ed6f3862330e50ddd7","src/bin/generate-test-data.rs":"7f1c9dc445418c7627f89d1f2aa8e550d0f85b3d1f05edb7c378ab9441714f1f","src/db.rs":"0b45180f3031759213a0421231b6f109ed4f5c88aca556df159ce2717416cfec","src/error.rs":"6831fc329044174a8451b8b008c0b96c47404c591eb42e880562e65da0adfd0f","src/interest.rs":"ce6298ef8f69fcb57c8e5797467cbe1c0212a0d94daf828b12845740ac14a166","src/lib.rs":"7a0f0ad0a43f371035d9c0b73d143cf1b387d4b8cfad0d0db79314b5b91fd43c","src/populate_interests.rs":"b8905b52f9fc80719c175253b758413f606b27660e660635094421eec8b24c8f","src/relevancy.udl":"a3fae5097f9e8b39bb6c74ed6789906748c46f22d377e3dcb73b08731908f5bc","src/schema.rs":"f782c712f10c4f1af2f9e1424d6b52f59a2bacfcc452a8feb763f36478f5dd5d","src/url_hash.rs":"5619a249d471e7b642d889bad09e93212559c8b947010d49492c1423da2b310e","test-data":"392fc950363c9953ea6ab144b81d84021c4af1e1177cc0adac4eda5688c8bc33"},"package":null} {"files":{"Cargo.toml":"8b8d81c6af8ab402f8febf103e10917a55886cacb01d0448c4426a2b54d244d0","build.rs":"a562bfe527d21c4e8a1a44b892defa83cdff141ec5dd51ed6f3862330e50ddd7","src/bin/generate-test-data.rs":"7f1c9dc445418c7627f89d1f2aa8e550d0f85b3d1f05edb7c378ab9441714f1f","src/db.rs":"9470c4566fc6296571b35d493f752d8a1f3c1fd8f7f420007ee3fa3e762af92b","src/error.rs":"00a10d47c9cfd25c4104174ec07eca6a08103564cb1b2c4961739f17f2892fb2","src/interest.rs":"e28b51c9692905ca87e6ab23decf1c1b3897bf29cb3d0d61f71213553b561dcc","src/lib.rs":"a42ffd826fd38a5f9436d9de00fd7b548e233a39063fbc030cae10052e0b4253","src/populate_interests.rs":"96c825796c6cfb7b1bb3a11c6d1b9c3639107943f5d35a259e195fec15aeef4e","src/relevancy.udl":"3de62ea53b4f34c11ff94c782b8389d58525ca40bb292b4b81370025813def5e","src/schema.rs":"f782c712f10c4f1af2f9e1424d6b52f59a2bacfcc452a8feb763f36478f5dd5d","src/url_hash.rs":"5619a249d471e7b642d889bad09e93212559c8b947010d49492c1423da2b310e","test-data":"1ef2cd092d59e7e126cd4a514af983d449ed9f9c98708702fd237464a76c2b5e"},"package":null}

View file

@ -35,6 +35,9 @@ url = "2.5"
[dependencies.error-support] [dependencies.error-support]
path = "../support/error" path = "../support/error"
[dependencies.interrupt-support]
path = "../support/interrupt"
[dependencies.rusqlite] [dependencies.rusqlite]
version = "0.30.0" version = "0.30.0"
features = ["bundled"] features = ["bundled"]

View file

@ -8,52 +8,66 @@ use crate::{
url_hash::{hash_url, UrlHash}, url_hash::{hash_url, UrlHash},
Interest, InterestVector, Result, Interest, InterestVector, Result,
}; };
use parking_lot::Mutex; use interrupt_support::SqlInterruptScope;
use rusqlite::{Connection, OpenFlags}; use rusqlite::{Connection, OpenFlags};
use sql_support::{open_database::open_database_with_flags, ConnExt}; use sql_support::{ConnExt, LazyDb};
use std::path::Path; use std::path::Path;
/// A thread-safe wrapper around an SQLite connection to the Relevancy database /// A thread-safe wrapper around an SQLite connection to the Relevancy database
pub struct RelevancyDb { pub struct RelevancyDb {
pub conn: Mutex<Connection>, reader: LazyDb<RelevancyConnectionInitializer>,
writer: LazyDb<RelevancyConnectionInitializer>,
} }
impl RelevancyDb { impl RelevancyDb {
pub fn open(path: impl AsRef<Path>) -> Result<Self> { pub fn new(path: impl AsRef<Path>) -> Result<Self> {
let conn = open_database_with_flags( // Note: use `SQLITE_OPEN_READ_WRITE` for both read and write connections.
path, // Even if we're opening a read connection, we may need to do a write as part of the
OpenFlags::SQLITE_OPEN_URI // initialization process.
| OpenFlags::SQLITE_OPEN_NO_MUTEX //
| OpenFlags::SQLITE_OPEN_CREATE // The read-only nature of the connection is enforced by the fact that [RelevancyDb::read] uses a
| OpenFlags::SQLITE_OPEN_READ_WRITE, // shared ref to the `RelevancyDao`.
&RelevancyConnectionInitializer, let db_open_flags = OpenFlags::SQLITE_OPEN_URI
)?; | OpenFlags::SQLITE_OPEN_NO_MUTEX
| OpenFlags::SQLITE_OPEN_CREATE
| OpenFlags::SQLITE_OPEN_READ_WRITE;
Ok(Self { Ok(Self {
conn: Mutex::new(conn), reader: LazyDb::new(path.as_ref(), db_open_flags, RelevancyConnectionInitializer),
writer: LazyDb::new(path.as_ref(), db_open_flags, RelevancyConnectionInitializer),
}) })
} }
pub fn close(&self) {
self.reader.close(true);
self.writer.close(true);
}
pub fn interrupt(&self) {
self.reader.interrupt();
self.writer.interrupt();
}
#[cfg(test)] #[cfg(test)]
pub fn open_for_test() -> Self { pub fn new_for_test() -> Self {
use std::sync::atomic::{AtomicU32, Ordering}; use std::sync::atomic::{AtomicU32, Ordering};
static COUNTER: AtomicU32 = AtomicU32::new(0); static COUNTER: AtomicU32 = AtomicU32::new(0);
let count = COUNTER.fetch_add(1, Ordering::Relaxed); let count = COUNTER.fetch_add(1, Ordering::Relaxed);
Self::open(format!("file:test{count}.sqlite?mode=memory&cache=shared")).unwrap() Self::new(format!("file:test{count}.sqlite?mode=memory&cache=shared")).unwrap()
} }
/// Accesses the Suggest database in a transaction for reading. /// Accesses the Suggest database in a transaction for reading.
pub fn read<T>(&self, op: impl FnOnce(&RelevancyDao) -> Result<T>) -> Result<T> { pub fn read<T>(&self, op: impl FnOnce(&RelevancyDao) -> Result<T>) -> Result<T> {
let mut conn = self.conn.lock(); let (mut conn, scope) = self.reader.lock()?;
let tx = conn.transaction()?; let tx = conn.transaction()?;
let dao = RelevancyDao::new(&tx); let dao = RelevancyDao::new(&tx, scope);
op(&dao) op(&dao)
} }
/// Accesses the Suggest database in a transaction for reading and writing. /// Accesses the Suggest database in a transaction for reading and writing.
pub fn read_write<T>(&self, op: impl FnOnce(&mut RelevancyDao) -> Result<T>) -> Result<T> { pub fn read_write<T>(&self, op: impl FnOnce(&mut RelevancyDao) -> Result<T>) -> Result<T> {
let mut conn = self.conn.lock(); let (mut conn, scope) = self.writer.lock()?;
let tx = conn.transaction()?; let tx = conn.transaction()?;
let mut dao = RelevancyDao::new(&tx); let mut dao = RelevancyDao::new(&tx, scope);
let result = op(&mut dao)?; let result = op(&mut dao)?;
tx.commit()?; tx.commit()?;
Ok(result) Ok(result)
@ -67,11 +81,17 @@ impl RelevancyDb {
/// reference (`&mut self`). /// reference (`&mut self`).
pub struct RelevancyDao<'a> { pub struct RelevancyDao<'a> {
pub conn: &'a Connection, pub conn: &'a Connection,
pub scope: SqlInterruptScope,
} }
impl<'a> RelevancyDao<'a> { impl<'a> RelevancyDao<'a> {
fn new(conn: &'a Connection) -> Self { fn new(conn: &'a Connection, scope: SqlInterruptScope) -> Self {
Self { conn } Self { conn, scope }
}
/// Return Err(Interrupted) if we were interrupted
pub fn err_if_interrupted(&self) -> Result<()> {
Ok(self.scope.err_if_interrupted()?)
} }
/// Associate a URL with an interest /// Associate a URL with an interest

View file

@ -23,6 +23,9 @@ pub enum Error {
#[error("Error fetching interest data")] #[error("Error fetching interest data")]
FetchInterestDataError, FetchInterestDataError,
#[error("Interrupted")]
Interrupted(#[from] interrupt_support::Interrupted),
} }
/// Result enum for the public API /// Result enum for the public API

View file

@ -8,6 +8,7 @@
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] #[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
#[repr(u32)] #[repr(u32)]
pub enum Interest { pub enum Interest {
Inconclusive,
Animals, Animals,
Arts, Arts,
Autos, Autos,
@ -18,7 +19,8 @@ pub enum Interest {
Finance, Finance,
Food, Food,
Government, Government,
Health, //Disable this per policy consultation
// Health,
Hobbies, Hobbies,
Home, Home,
News, News,
@ -27,7 +29,6 @@ pub enum Interest {
Sports, Sports,
Tech, Tech,
Travel, Travel,
Inconclusive,
} }
impl From<Interest> for u32 { impl From<Interest> for u32 {
@ -54,10 +55,11 @@ impl From<u32> for Interest {
} }
impl Interest { impl Interest {
const COUNT: usize = 20; const COUNT: usize = 19;
pub fn all() -> [Interest; Self::COUNT] { pub fn all() -> [Interest; Self::COUNT] {
[ [
Self::Inconclusive,
Self::Animals, Self::Animals,
Self::Arts, Self::Arts,
Self::Autos, Self::Autos,
@ -68,7 +70,7 @@ impl Interest {
Self::Finance, Self::Finance,
Self::Food, Self::Food,
Self::Government, Self::Government,
Self::Health, // Self::Health,
Self::Hobbies, Self::Hobbies,
Self::Home, Self::Home,
Self::News, Self::News,
@ -77,7 +79,6 @@ impl Interest {
Self::Sports, Self::Sports,
Self::Tech, Self::Tech,
Self::Travel, Self::Travel,
Self::Inconclusive,
] ]
} }
} }
@ -88,6 +89,7 @@ impl Interest {
/// number of elements. /// number of elements.
#[derive(Debug, Default, PartialEq, Eq)] #[derive(Debug, Default, PartialEq, Eq)]
pub struct InterestVector { pub struct InterestVector {
pub inconclusive: u32,
pub animals: u32, pub animals: u32,
pub arts: u32, pub arts: u32,
pub autos: u32, pub autos: u32,
@ -98,7 +100,7 @@ pub struct InterestVector {
pub finance: u32, pub finance: u32,
pub food: u32, pub food: u32,
pub government: u32, pub government: u32,
pub health: u32, // pub health: u32,
pub hobbies: u32, pub hobbies: u32,
pub home: u32, pub home: u32,
pub news: u32, pub news: u32,
@ -107,7 +109,6 @@ pub struct InterestVector {
pub sports: u32, pub sports: u32,
pub tech: u32, pub tech: u32,
pub travel: u32, pub travel: u32,
pub inconclusive: u32,
} }
impl std::ops::Index<Interest> for InterestVector { impl std::ops::Index<Interest> for InterestVector {
@ -115,6 +116,7 @@ impl std::ops::Index<Interest> for InterestVector {
fn index(&self, index: Interest) -> &u32 { fn index(&self, index: Interest) -> &u32 {
match index { match index {
Interest::Inconclusive => &self.inconclusive,
Interest::Animals => &self.animals, Interest::Animals => &self.animals,
Interest::Arts => &self.arts, Interest::Arts => &self.arts,
Interest::Autos => &self.autos, Interest::Autos => &self.autos,
@ -125,7 +127,7 @@ impl std::ops::Index<Interest> for InterestVector {
Interest::Finance => &self.finance, Interest::Finance => &self.finance,
Interest::Food => &self.food, Interest::Food => &self.food,
Interest::Government => &self.government, Interest::Government => &self.government,
Interest::Health => &self.health, // Interest::Health => &self.health,
Interest::Hobbies => &self.hobbies, Interest::Hobbies => &self.hobbies,
Interest::Home => &self.home, Interest::Home => &self.home,
Interest::News => &self.news, Interest::News => &self.news,
@ -134,7 +136,6 @@ impl std::ops::Index<Interest> for InterestVector {
Interest::Sports => &self.sports, Interest::Sports => &self.sports,
Interest::Tech => &self.tech, Interest::Tech => &self.tech,
Interest::Travel => &self.travel, Interest::Travel => &self.travel,
Interest::Inconclusive => &self.inconclusive,
} }
} }
} }
@ -142,6 +143,7 @@ impl std::ops::Index<Interest> for InterestVector {
impl std::ops::IndexMut<Interest> for InterestVector { impl std::ops::IndexMut<Interest> for InterestVector {
fn index_mut(&mut self, index: Interest) -> &mut u32 { fn index_mut(&mut self, index: Interest) -> &mut u32 {
match index { match index {
Interest::Inconclusive => &mut self.inconclusive,
Interest::Animals => &mut self.animals, Interest::Animals => &mut self.animals,
Interest::Arts => &mut self.arts, Interest::Arts => &mut self.arts,
Interest::Autos => &mut self.autos, Interest::Autos => &mut self.autos,
@ -152,7 +154,7 @@ impl std::ops::IndexMut<Interest> for InterestVector {
Interest::Finance => &mut self.finance, Interest::Finance => &mut self.finance,
Interest::Food => &mut self.food, Interest::Food => &mut self.food,
Interest::Government => &mut self.government, Interest::Government => &mut self.government,
Interest::Health => &mut self.health, // Interest::Health => &mut self.health,
Interest::Hobbies => &mut self.hobbies, Interest::Hobbies => &mut self.hobbies,
Interest::Home => &mut self.home, Interest::Home => &mut self.home,
Interest::News => &mut self.news, Interest::News => &mut self.news,
@ -161,7 +163,6 @@ impl std::ops::IndexMut<Interest> for InterestVector {
Interest::Sports => &mut self.sports, Interest::Sports => &mut self.sports,
Interest::Tech => &mut self.tech, Interest::Tech => &mut self.tech,
Interest::Travel => &mut self.travel, Interest::Travel => &mut self.travel,
Interest::Inconclusive => &mut self.inconclusive,
} }
} }
} }

View file

@ -31,10 +31,18 @@ impl RelevancyStore {
#[handle_error(Error)] #[handle_error(Error)]
pub fn new(db_path: String) -> ApiResult<Self> { pub fn new(db_path: String) -> ApiResult<Self> {
Ok(Self { Ok(Self {
db: RelevancyDb::open(db_path)?, db: RelevancyDb::new(db_path)?,
}) })
} }
pub fn close(&self) {
self.db.close()
}
pub fn interrupt(&self) {
self.db.interrupt()
}
/// Ingest top URLs to build the user's interest vector. /// Ingest top URLs to build the user's interest vector.
/// ///
/// Consumer should pass a list of the user's top URLs by frecency to this method. It will /// Consumer should pass a list of the user's top URLs by frecency to this method. It will

View file

@ -5,6 +5,9 @@
use crate::{url_hash::UrlHash, Error, Interest, RelevancyDb, Result}; use crate::{url_hash::UrlHash, Error, Interest, RelevancyDb, Result};
use std::io::{Cursor, Read}; use std::io::{Cursor, Read};
// Number of rows to write when inserting interest data before checking for interruption
const WRITE_CHUNK_SIZE: usize = 100;
pub fn ensure_interest_data_populated(db: &RelevancyDb) -> Result<()> { pub fn ensure_interest_data_populated(db: &RelevancyDb) -> Result<()> {
if !db.read(|dao| dao.need_to_load_url_interests())? { if !db.read(|dao| dao.need_to_load_url_interests())? {
return Ok(()); return Ok(());
@ -17,8 +20,11 @@ pub fn ensure_interest_data_populated(db: &RelevancyDb) -> Result<()> {
} }
}; };
db.read_write(move |dao| { db.read_write(move |dao| {
for (url_hash, interest) in interest_data { for chunk in interest_data.chunks(WRITE_CHUNK_SIZE) {
dao.add_url_interest(url_hash, interest)?; for (url_hash, interest) in chunk {
dao.add_url_interest(*url_hash, *interest)?;
}
dao.err_if_interrupted()?;
} }
Ok(()) Ok(())
}) })
@ -26,7 +32,8 @@ pub fn ensure_interest_data_populated(db: &RelevancyDb) -> Result<()> {
/// Fetch the interest data /// Fetch the interest data
fn fetch_interest_data() -> std::io::Result<Vec<(UrlHash, Interest)>> { fn fetch_interest_data() -> std::io::Result<Vec<(UrlHash, Interest)>> {
// TODO: this hack should be replaced with something that fetches from remote settings // TODO: this hack should be replaced with something that fetches from remote settings.
// It should ideally check for interruption while fetching the data.
let bytes = include_bytes!("../test-data"); let bytes = include_bytes!("../test-data");
let mut reader = Cursor::new(&bytes); let mut reader = Cursor::new(&bytes);
let mut data = vec![]; let mut data = vec![];
@ -53,7 +60,7 @@ mod test {
#[test] #[test]
fn test_interest_vectors() { fn test_interest_vectors() {
let db = RelevancyDb::open_for_test(); let db = RelevancyDb::new_for_test();
ensure_interest_data_populated(&db).unwrap(); ensure_interest_data_populated(&db).unwrap();
db.read(|dao| { db.read(|dao| {
// Test that the interest data matches the values we started from in // Test that the interest data matches the values we started from in
@ -115,7 +122,7 @@ mod test {
#[test] #[test]
fn test_variations_on_the_url() { fn test_variations_on_the_url() {
let db = RelevancyDb::open_for_test(); let db = RelevancyDb::new_for_test();
ensure_interest_data_populated(&db).unwrap(); ensure_interest_data_populated(&db).unwrap();
db.read(|dao| { db.read(|dao| {
// Different paths/queries should work // Different paths/queries should work

View file

@ -8,9 +8,19 @@ interface RelevancyApiError {
// Top-level class for the Relevancy component // Top-level class for the Relevancy component
interface RelevancyStore { interface RelevancyStore {
// Construct a new RelevancyStore // Construct a new RelevancyStore
//
// This is non-blocking since databases and other resources are lazily opened.
[Throws=RelevancyApiError] [Throws=RelevancyApiError]
constructor(string dbpath); constructor(string dbpath);
// Close any open resources (for example databases)
//
// Calling `close` will interrupt any in-progress queries on other threads.
void close();
// Interrupt any current database queries
void interrupt();
// Ingest the top URLs by frequency to build up the user's interest vector // Ingest the top URLs by frequency to build up the user's interest vector
[Throws=RelevancyApiError] [Throws=RelevancyApiError]
void ingest(sequence<string> top_urls); void ingest(sequence<string> top_urls);
@ -39,7 +49,7 @@ enum Interest {
"Finance", "Finance",
"Food", "Food",
"Government", "Government",
"Health", // "Health",
"Hobbies", "Hobbies",
"Home", "Home",
"News", "News",
@ -93,7 +103,7 @@ dictionary InterestVector {
u32 finance; u32 finance;
u32 food; u32 food;
u32 government; u32 government;
u32 health; // u32 health;
u32 hobbies; u32 hobbies;
u32 home; u32 home;
u32 news; u32 news;

Binary file not shown.

View file

@ -1 +1 @@
{"files":{"Cargo.toml":"1029f571c66d33c4dfc5e9fc55287a780329ce183f5d2b672de79737155c4227","build.rs":"4326f03729cf8f1673e4228e6dc111de1ea4d8bcc06351f7ae563efb2613f866","src/client.rs":"7510ae0d5bcb9fbaa2c43c4773aa0fd518edc78fe0f396c0e1d6dd442446f429","src/config.rs":"7bb678addfae3b4ed5f2892d32263e5b33cc05e5a12a250f664150e78211f94a","src/error.rs":"192ca42af7c6b882f3129378c23b45dab8a0d2b179e23a8813a335ffd56b21dc","src/lib.rs":"416e99894e152f6cea7418ad2fabfd94bc3d907efd9f33fbd2a83fb99452b2df","src/remote_settings.udl":"2e71491ad3894d17e5bde0663d9490bfea6294d99cdbe9d67a36137faeedc593","uniffi.toml":"f8ec8dc593e0d501c2e9e40368ec93ec33b1edd8608e29495e0a54b63144e880"},"package":null} {"files":{"Cargo.toml":"1029f571c66d33c4dfc5e9fc55287a780329ce183f5d2b672de79737155c4227","build.rs":"4326f03729cf8f1673e4228e6dc111de1ea4d8bcc06351f7ae563efb2613f866","src/client.rs":"666ef6536a81b107cdd6047b56ffb53a052c0a615b1fa827e630892c0e528a5d","src/config.rs":"52a209256acd8b1fada2b91e9d9f669df0ee6e9609baad7ec34a2111ed2a6541","src/error.rs":"b0cb36fb105d7ae8a2d8c2e5f98f410c106f1fd45c2e3e9bd8e865c0d2eb8726","src/lib.rs":"655559b1b0f09ad221ceba462ace73d9216a6551d70062126ffc8a085d8b89bb","src/remote_settings.udl":"1ffeb10385e4db63606cda79bb59e77170af1d2ca0028da8ab2c4d7622969734","uniffi.toml":"f8ec8dc593e0d501c2e9e40368ec93ec33b1edd8608e29495e0a54b63144e880"},"package":null}

View file

@ -4,7 +4,7 @@
use crate::config::RemoteSettingsConfig; use crate::config::RemoteSettingsConfig;
use crate::error::{RemoteSettingsError, Result}; use crate::error::{RemoteSettingsError, Result};
use crate::UniffiCustomTypeConverter; use crate::{RemoteSettingsServer, UniffiCustomTypeConverter};
use parking_lot::Mutex; use parking_lot::Mutex;
use serde::Deserialize; use serde::Deserialize;
use std::{ use std::{
@ -31,11 +31,17 @@ pub struct Client {
impl Client { impl Client {
/// Create a new [Client] with properties matching config. /// Create a new [Client] with properties matching config.
pub fn new(config: RemoteSettingsConfig) -> Result<Self> { pub fn new(config: RemoteSettingsConfig) -> Result<Self> {
let server_url = config let server = match (config.server, config.server_url) {
.server_url (Some(server), None) => server,
.unwrap_or_else(|| String::from("https://firefox.settings.services.mozilla.com")); (None, Some(server_url)) => RemoteSettingsServer::Custom { url: server_url },
(None, None) => RemoteSettingsServer::Prod,
(Some(_), Some(_)) => Err(RemoteSettingsError::ConfigError(
"`RemoteSettingsConfig` takes either `server` or `server_url`, not both".into(),
))?,
};
let bucket_name = config.bucket_name.unwrap_or_else(|| String::from("main")); let bucket_name = config.bucket_name.unwrap_or_else(|| String::from("main"));
let base_url = Url::parse(&server_url)?; let base_url = server.url()?;
Ok(Self { Ok(Self {
base_url, base_url,
@ -519,6 +525,7 @@ mod test {
#[test] #[test]
fn test_defaults() { fn test_defaults() {
let config = RemoteSettingsConfig { let config = RemoteSettingsConfig {
server: None,
server_url: None, server_url: None,
bucket_name: None, bucket_name: None,
collection_name: String::from("the-collection"), collection_name: String::from("the-collection"),
@ -531,6 +538,33 @@ mod test {
assert_eq!(String::from("main"), client.bucket_name); assert_eq!(String::from("main"), client.bucket_name);
} }
#[test]
fn test_deprecated_server_url() {
let config = RemoteSettingsConfig {
server: None,
server_url: Some("https://example.com".into()),
bucket_name: None,
collection_name: String::from("the-collection"),
};
let client = Client::new(config).unwrap();
assert_eq!(Url::parse("https://example.com").unwrap(), client.base_url);
}
#[test]
fn test_invalid_config() {
let config = RemoteSettingsConfig {
server: Some(RemoteSettingsServer::Prod),
server_url: Some("https://example.com".into()),
bucket_name: None,
collection_name: String::from("the-collection"),
};
match Client::new(config) {
Ok(_) => panic!("Wanted config error; got client"),
Err(RemoteSettingsError::ConfigError(_)) => {}
Err(err) => panic!("Wanted config error; got {}", err),
}
}
#[test] #[test]
fn test_attachment_can_be_downloaded() { fn test_attachment_can_be_downloaded() {
viaduct_reqwest::use_reqwest_backend(); viaduct_reqwest::use_reqwest_backend();
@ -552,7 +586,10 @@ mod test {
.create(); .create();
let config = RemoteSettingsConfig { let config = RemoteSettingsConfig {
server_url: Some(mockito::server_url()), server: Some(RemoteSettingsServer::Custom {
url: mockito::server_url(),
}),
server_url: None,
collection_name: String::from("the-collection"), collection_name: String::from("the-collection"),
bucket_name: None, bucket_name: None,
}; };
@ -588,7 +625,10 @@ mod test {
.create(); .create();
let config = RemoteSettingsConfig { let config = RemoteSettingsConfig {
server_url: Some(mockito::server_url()), server: Some(RemoteSettingsServer::Custom {
url: mockito::server_url(),
}),
server_url: None,
collection_name: String::from("the-collection"), collection_name: String::from("the-collection"),
bucket_name: None, bucket_name: None,
}; };
@ -617,7 +657,10 @@ mod test {
.with_header("etag", "\"1000\"") .with_header("etag", "\"1000\"")
.create(); .create();
let config = RemoteSettingsConfig { let config = RemoteSettingsConfig {
server_url: Some(mockito::server_url()), server: Some(RemoteSettingsServer::Custom {
url: mockito::server_url(),
}),
server_url: None,
collection_name: String::from("the-collection"), collection_name: String::from("the-collection"),
bucket_name: Some(String::from("the-bucket")), bucket_name: Some(String::from("the-bucket")),
}; };
@ -644,7 +687,10 @@ mod test {
.with_header("Retry-After", "60") .with_header("Retry-After", "60")
.create(); .create();
let config = RemoteSettingsConfig { let config = RemoteSettingsConfig {
server_url: Some(mockito::server_url()), server: Some(RemoteSettingsServer::Custom {
url: mockito::server_url(),
}),
server_url: None,
collection_name: String::from("the-collection"), collection_name: String::from("the-collection"),
bucket_name: Some(String::from("the-bucket")), bucket_name: Some(String::from("the-bucket")),
}; };
@ -686,7 +732,10 @@ mod test {
.with_header("etag", "\"1000\"") .with_header("etag", "\"1000\"")
.create(); .create();
let config = RemoteSettingsConfig { let config = RemoteSettingsConfig {
server_url: Some(mockito::server_url()), server: Some(RemoteSettingsServer::Custom {
url: mockito::server_url(),
}),
server_url: None,
collection_name: String::from("the-collection"), collection_name: String::from("the-collection"),
bucket_name: Some(String::from("the-bucket")), bucket_name: Some(String::from("the-bucket")),
}; };
@ -810,7 +859,10 @@ mod test {
.with_header("etag", "\"1000\"") .with_header("etag", "\"1000\"")
.create(); .create();
let config = RemoteSettingsConfig { let config = RemoteSettingsConfig {
server_url: Some(mockito::server_url()), server: Some(RemoteSettingsServer::Custom {
url: mockito::server_url(),
}),
server_url: None,
collection_name: String::from("the-collection"), collection_name: String::from("the-collection"),
bucket_name: Some(String::from("the-bucket")), bucket_name: Some(String::from("the-bucket")),
}; };
@ -850,7 +902,10 @@ mod test {
.with_header("etag", "\"1000\"") .with_header("etag", "\"1000\"")
.create(); .create();
let config = RemoteSettingsConfig { let config = RemoteSettingsConfig {
server_url: Some(mockito::server_url()), server: Some(RemoteSettingsServer::Custom {
url: mockito::server_url(),
}),
server_url: None,
collection_name: String::from("the-collection"), collection_name: String::from("the-collection"),
bucket_name: Some(String::from("the-bucket")), bucket_name: Some(String::from("the-bucket")),
}; };
@ -953,7 +1008,10 @@ mod test {
.create(); .create();
let config = RemoteSettingsConfig { let config = RemoteSettingsConfig {
server_url: Some(mockito::server_url()), server: Some(RemoteSettingsServer::Custom {
url: mockito::server_url(),
}),
server_url: None,
bucket_name: Some(String::from("the-bucket")), bucket_name: Some(String::from("the-bucket")),
collection_name: String::from("the-collection"), collection_name: String::from("the-collection"),
}; };
@ -982,7 +1040,10 @@ mod test {
.create(); .create();
let config = RemoteSettingsConfig { let config = RemoteSettingsConfig {
server_url: Some(mockito::server_url()), server: Some(RemoteSettingsServer::Custom {
url: mockito::server_url(),
}),
server_url: None,
bucket_name: Some(String::from("the-bucket")), bucket_name: Some(String::from("the-bucket")),
collection_name: String::from("the-collection"), collection_name: String::from("the-collection"),
}; };

View file

@ -3,19 +3,45 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//! This module defines the custom configurations that consumers can set. //! This module defines the custom configurations that consumers can set.
//! Those configurations override default values and can be used to set a custom server url, //! Those configurations override default values and can be used to set a custom server,
//! collection name, and bucket name. //! collection name, and bucket name.
//! The purpose of the configuration parameters are to allow consumers an easy debugging option, //! The purpose of the configuration parameters are to allow consumers an easy debugging option,
//! and the ability to be explicit about the server. //! and the ability to be explicit about the server.
use url::Url;
use crate::Result;
/// Custom configuration for the client. /// Custom configuration for the client.
/// Currently includes the following: /// Currently includes the following:
/// - `server_url`: The optional url for the settings server. If not specified, the standard server will be used. /// - `server`: The Remote Settings server to use. If not specified, defaults to the production server (`RemoteSettingsServer::Prod`).
/// - `server_url`: An optional custom Remote Settings server URL. Deprecated; please use `server` instead.
/// - `bucket_name`: The optional name of the bucket containing the collection on the server. If not specified, the standard bucket will be used. /// - `bucket_name`: The optional name of the bucket containing the collection on the server. If not specified, the standard bucket will be used.
/// - `collection_name`: The name of the collection for the settings server. /// - `collection_name`: The name of the collection for the settings server.
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct RemoteSettingsConfig { pub struct RemoteSettingsConfig {
pub server: Option<RemoteSettingsServer>,
pub server_url: Option<String>, pub server_url: Option<String>,
pub bucket_name: Option<String>, pub bucket_name: Option<String>,
pub collection_name: String, pub collection_name: String,
} }
/// The Remote Settings server that the client should use.
#[derive(Debug, Clone)]
pub enum RemoteSettingsServer {
Prod,
Stage,
Dev,
Custom { url: String },
}
impl RemoteSettingsServer {
pub fn url(&self) -> Result<Url> {
Ok(match self {
Self::Prod => Url::parse("https://firefox.settings.services.mozilla.com").unwrap(),
Self::Stage => Url::parse("https://firefox.settings.services.allizom.org").unwrap(),
Self::Dev => Url::parse("https://remote-settings-dev.allizom.org").unwrap(),
Self::Custom { url } => Url::parse(url)?,
})
}
}

View file

@ -22,6 +22,8 @@ pub enum RemoteSettingsError {
ResponseError(String), ResponseError(String),
#[error("This server doesn't support attachments")] #[error("This server doesn't support attachments")]
AttachmentsUnsupportedError, AttachmentsUnsupportedError,
#[error("Error configuring client: {0}")]
ConfigError(String),
} }
pub type Result<T, E = RemoteSettingsError> = std::result::Result<T, E>; pub type Result<T, E = RemoteSettingsError> = std::result::Result<T, E>;

View file

@ -11,7 +11,7 @@ pub use client::{
RsJsonObject, SortOrder, RsJsonObject, SortOrder,
}; };
pub mod config; pub mod config;
pub use config::RemoteSettingsConfig; pub use config::{RemoteSettingsConfig, RemoteSettingsServer};
uniffi::include_scaffolding!("remote_settings"); uniffi::include_scaffolding!("remote_settings");
@ -70,7 +70,10 @@ mod test {
.create(); .create();
let config = RemoteSettingsConfig { let config = RemoteSettingsConfig {
server_url: Some(mockito::server_url()), server: Some(RemoteSettingsServer::Custom {
url: mockito::server_url(),
}),
server_url: None,
bucket_name: Some(String::from("the-bucket")), bucket_name: Some(String::from("the-bucket")),
collection_name: String::from("the-collection"), collection_name: String::from("the-collection"),
}; };
@ -98,7 +101,10 @@ mod test {
.create(); .create();
let config = RemoteSettingsConfig { let config = RemoteSettingsConfig {
server_url: Some(mockito::server_url()), server: Some(RemoteSettingsServer::Custom {
url: mockito::server_url(),
}),
server_url: None,
bucket_name: Some(String::from("the-bucket")), bucket_name: Some(String::from("the-bucket")),
collection_name: String::from("the-collection"), collection_name: String::from("the-collection"),
}; };
@ -119,7 +125,10 @@ mod test {
fn test_download() { fn test_download() {
viaduct_reqwest::use_reqwest_backend(); viaduct_reqwest::use_reqwest_backend();
let config = RemoteSettingsConfig { let config = RemoteSettingsConfig {
server_url: Some("http://localhost:8888".to_string()), server: Some(RemoteSettingsServer::Custom {
url: "http://localhost:8888".into(),
}),
server_url: None,
bucket_name: Some(String::from("the-bucket")), bucket_name: Some(String::from("the-bucket")),
collection_name: String::from("the-collection"), collection_name: String::from("the-collection"),
}; };

View file

@ -7,10 +7,19 @@ typedef string RsJsonObject;
namespace remote_settings {}; namespace remote_settings {};
[Enum]
interface RemoteSettingsServer {
Prod();
Stage();
Dev();
Custom(string url);
};
dictionary RemoteSettingsConfig { dictionary RemoteSettingsConfig {
string collection_name; string collection_name;
string? bucket_name = null; string? bucket_name = null;
string? server_url = null; string? server_url = null;
RemoteSettingsServer? server = null;
}; };
dictionary RemoteSettingsResponse { dictionary RemoteSettingsResponse {
@ -43,6 +52,7 @@ enum RemoteSettingsError {
"BackoffError", "BackoffError",
"ResponseError", "ResponseError",
"AttachmentsUnsupportedError", "AttachmentsUnsupportedError",
"ConfigError",
}; };
interface RemoteSettings { interface RemoteSettings {

View file

@ -1 +1 @@
{"files":{"Cargo.toml":"812811e5a8e00abe3ec345cd8fd435e27fec7cb8f2e45a0e93e5becf564c46ad","src/conn_ext.rs":"e48e862e47c000c545dcc766fc1889498a8709bee00e240ed68d247b0fbef577","src/debug_tools.rs":"bece2bc3d35379b81ea2f942a0a3e909e0ab0553656505904745548eacaf402a","src/each_chunk.rs":"8aaba842e43b002fbc0fee95d14ce08faa7187b1979c765b2e270cd4802607a5","src/lib.rs":"af704ec04beb6c2c388d4566710e1167b18fb64acb248ccf37a67679daffddb6","src/maybe_cached.rs":"0b18425595055883a98807fbd62ff27a79c18af34e7cb3439f8c3438463ef2dd","src/open_database.rs":"ba290bfb39468e96f9b3ea865e0c13c2cc5a731ea8877a9feb6b1de4f7d666c4","src/repeat.rs":"b4c5ff5d083afba7f9f153f54aba2e6859b78b85c82d48dbd6bd58f67da9e6b9"},"package":null} {"files":{"Cargo.toml":"2a0d414052d959098dcb3c22fce0eb008710ab594a6d0e5c58056b2dd497a359","src/conn_ext.rs":"e48e862e47c000c545dcc766fc1889498a8709bee00e240ed68d247b0fbef577","src/debug_tools.rs":"bece2bc3d35379b81ea2f942a0a3e909e0ab0553656505904745548eacaf402a","src/each_chunk.rs":"8aaba842e43b002fbc0fee95d14ce08faa7187b1979c765b2e270cd4802607a5","src/lazy.rs":"a96b4f4ec572538b49cdfa8fee981dcf5143a5f51163fb8a573d3ac128df70f9","src/lib.rs":"b2c120db4928c3e4abdd96405fd4c1016255699bdbc38c8cd60dbd3431fc0a12","src/maybe_cached.rs":"0b18425595055883a98807fbd62ff27a79c18af34e7cb3439f8c3438463ef2dd","src/open_database.rs":"dfc6f68354bf35ee1fc235986e5563e9f8c5cf7920dfe77a9a3d3ad4cfd3723f","src/repeat.rs":"b4c5ff5d083afba7f9f153f54aba2e6859b78b85c82d48dbd6bd58f67da9e6b9"},"package":null}

View file

@ -20,6 +20,7 @@ license = "MPL-2.0"
ffi-support = "0.4" ffi-support = "0.4"
lazy_static = "1.4" lazy_static = "1.4"
log = "0.4" log = "0.4"
parking_lot = ">=0.11,<=0.12"
tempfile = "3.1.0" tempfile = "3.1.0"
thiserror = "1.0" thiserror = "1.0"

151
third_party/rust/sql-support/src/lazy.rs vendored Normal file
View file

@ -0,0 +1,151 @@
/* 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 crate::open_database::{open_database_with_flags, ConnectionInitializer, Error};
use interrupt_support::{register_interrupt, SqlInterruptHandle, SqlInterruptScope};
use parking_lot::{MappedMutexGuard, Mutex, MutexGuard};
use rusqlite::{Connection, OpenFlags};
use std::{
path::{Path, PathBuf},
sync::{Arc, Weak},
};
/// Lazily-loaded database with interruption support
///
/// In addition to the [Self::interrupt] method, LazyDb also calls
/// [interrupt_support::register_interrupt] on any opened database. This means that if
/// [interrupt_support::shutdown] is called it will interrupt this database if it's open and
/// in-use.
pub struct LazyDb<CI> {
path: PathBuf,
open_flags: OpenFlags,
connection_initializer: CI,
// Note: if you're going to lock both mutexes at once, make sure to lock the connection mutex
// first. Otherwise, you risk creating a deadlock where two threads each hold one of the locks
// and is waiting for the other.
connection: Mutex<Option<Connection>>,
// It's important to use a separate mutex for the interrupt handle, since the whole point is to
// interrupt while another thread holds the connection mutex. Since the only mutation is
// setting/unsetting the Arc, maybe this could be sped up by using something like
// `arc_swap::ArcSwap`, but that seems like overkill for our purposes. This mutex should rarely
// be contested and interrupt operations execute quickly.
interrupt_handle: Mutex<Option<Arc<SqlInterruptHandle>>>,
}
impl<CI: ConnectionInitializer> LazyDb<CI> {
/// Create a new LazyDb
///
/// This does not open the connection and is non-blocking
pub fn new(path: &Path, open_flags: OpenFlags, connection_initializer: CI) -> Self {
Self {
path: path.to_owned(),
open_flags,
connection_initializer,
connection: Mutex::new(None),
interrupt_handle: Mutex::new(None),
}
}
/// Lock the database mutex and get a connection and interrupt scope.
///
/// If the connection is closed, it will be opened.
///
/// Calling `lock` again, or calling `close`, from the same thread while the mutex guard is
/// still alive will cause a deadlock.
pub fn lock(&self) -> Result<(MappedMutexGuard<'_, Connection>, SqlInterruptScope), Error> {
// Call get_conn first, then get_scope to ensure we acquire the locks in the correct order
let conn = self.get_conn()?;
let scope = self.get_scope(&conn)?;
Ok((conn, scope))
}
fn get_conn(&self) -> Result<MappedMutexGuard<'_, Connection>, Error> {
let mut guard = self.connection.lock();
// Open the database if it wasn't opened before. Do this outside of the MutexGuard::map call to simplify the error handling
if guard.is_none() {
*guard = Some(open_database_with_flags(
&self.path,
self.open_flags,
&self.connection_initializer,
)?);
};
// Use MutexGuard::map to get a Connection rather than Option<Connection>. The unwrap()
// call can't fail because of the previous code.
Ok(MutexGuard::map(guard, |conn_option| {
conn_option.as_mut().unwrap()
}))
}
fn get_scope(&self, conn: &Connection) -> Result<SqlInterruptScope, Error> {
let mut handle_guard = self.interrupt_handle.lock();
let result = match handle_guard.as_ref() {
Some(handle) => handle.begin_interrupt_scope(),
None => {
let handle = Arc::new(SqlInterruptHandle::new(conn));
register_interrupt(
Arc::downgrade(&handle) as Weak<dyn AsRef<SqlInterruptHandle> + Send + Sync>
);
handle_guard.insert(handle).begin_interrupt_scope()
}
};
// If we see an Interrupted error when beginning the scope, it means that we're in shutdown
// mode.
result.map_err(|_| Error::Shutdown)
}
/// Close the database if it's open
///
/// Pass interrupt=true to interrupt any in-progress queries before closing the database.
///
/// Do not call `close` if you already have a lock on the database in the current thread, as
/// this will cause a deadlock.
pub fn close(&self, interrupt: bool) {
let mut interrupt_handle = self.interrupt_handle.lock();
if let Some(handle) = interrupt_handle.as_ref() {
if interrupt {
handle.interrupt();
}
*interrupt_handle = None;
}
// Drop the interrupt handle lock to avoid holding both locks at once.
drop(interrupt_handle);
*self.connection.lock() = None;
}
/// Interrupt any in-progress queries
pub fn interrupt(&self) {
if let Some(handle) = self.interrupt_handle.lock().as_ref() {
handle.interrupt();
}
}
}
#[cfg(test)]
mod tests {
use super::*;
use crate::open_database::test_utils::TestConnectionInitializer;
fn open_test_db() -> LazyDb<TestConnectionInitializer> {
LazyDb::new(
Path::new(":memory:"),
OpenFlags::default(),
TestConnectionInitializer::new(),
)
}
#[test]
fn test_interrupt() {
let lazy_db = open_test_db();
let (_, scope) = lazy_db.lock().unwrap();
assert!(!scope.was_interrupted());
lazy_db.interrupt();
assert!(scope.was_interrupted());
}
#[test]
fn interrupt_before_db_is_opened_should_not_fail() {
let lazy_db = open_test_db();
lazy_db.interrupt();
}
}

View file

@ -10,14 +10,16 @@
mod conn_ext; mod conn_ext;
pub mod debug_tools; pub mod debug_tools;
mod each_chunk; mod each_chunk;
mod lazy;
mod maybe_cached; mod maybe_cached;
pub mod open_database; pub mod open_database;
mod repeat; mod repeat;
pub use crate::conn_ext::*; pub use conn_ext::*;
pub use crate::each_chunk::*; pub use each_chunk::*;
pub use crate::maybe_cached::*; pub use lazy::*;
pub use crate::repeat::*; pub use maybe_cached::*;
pub use repeat::*;
/// In PRAGMA foo='bar', `'bar'` must be a constant string (it cannot be a /// In PRAGMA foo='bar', `'bar'` must be a constant string (it cannot be a
/// bound parameter), so we need to escape manually. According to /// bound parameter), so we need to escape manually. According to

View file

@ -46,6 +46,8 @@ pub enum Error {
SqlError(rusqlite::Error), SqlError(rusqlite::Error),
#[error("Failed to recover a corrupt database due to an error deleting the file: {0}")] #[error("Failed to recover a corrupt database due to an error deleting the file: {0}")]
RecoveryError(std::io::Error), RecoveryError(std::io::Error),
#[error("In shutdown mode")]
Shutdown,
} }
impl From<rusqlite::Error> for Error { impl From<rusqlite::Error> for Error {
@ -241,99 +243,28 @@ fn set_schema_version(conn: &Connection, version: u32) -> Result<()> {
// our other crates. // our other crates.
pub mod test_utils { pub mod test_utils {
use super::*; use super::*;
use std::path::PathBuf; use std::{cell::RefCell, collections::HashSet, path::PathBuf};
use tempfile::TempDir; use tempfile::TempDir;
// Database file that we can programatically run upgrades on pub struct TestConnectionInitializer {
//
// We purposefully don't keep a connection to the database around to force upgrades to always
// run against a newly opened DB, like they would in the real world. See #4106 for
// details.
pub struct MigratedDatabaseFile<CI: ConnectionInitializer> {
// Keep around a TempDir to ensure the database file stays around until this struct is
// dropped
_tempdir: TempDir,
pub connection_initializer: CI,
pub path: PathBuf,
}
impl<CI: ConnectionInitializer> MigratedDatabaseFile<CI> {
pub fn new(connection_initializer: CI, init_sql: &str) -> Self {
Self::new_with_flags(connection_initializer, init_sql, OpenFlags::default())
}
pub fn new_with_flags(
connection_initializer: CI,
init_sql: &str,
open_flags: OpenFlags,
) -> Self {
let tempdir = tempfile::tempdir().unwrap();
let path = tempdir.path().join(Path::new("db.sql"));
let conn = Connection::open_with_flags(&path, open_flags).unwrap();
conn.execute_batch(init_sql).unwrap();
Self {
_tempdir: tempdir,
connection_initializer,
path,
}
}
/// Attempt to run all upgrades up to a specific version.
///
/// This will result in a panic if an upgrade fails to run.
pub fn upgrade_to(&self, version: u32) {
let mut conn = self.open();
let tx = conn.transaction().unwrap();
let mut current_version = get_schema_version(&tx).unwrap();
while current_version < version {
self.connection_initializer
.upgrade_from(&tx, current_version)
.unwrap();
current_version += 1;
}
set_schema_version(&tx, current_version).unwrap();
self.connection_initializer.finish(&tx).unwrap();
tx.commit().unwrap();
}
/// Attempt to run all upgrades
///
/// This will result in a panic if an upgrade fails to run.
pub fn run_all_upgrades(&self) {
let current_version = get_schema_version(&self.open()).unwrap();
for version in current_version..CI::END_VERSION {
self.upgrade_to(version + 1);
}
}
pub fn open(&self) -> Connection {
Connection::open(&self.path).unwrap()
}
}
}
#[cfg(test)]
mod test {
use super::test_utils::MigratedDatabaseFile;
use super::*;
use std::cell::RefCell;
use std::io::Write;
struct TestConnectionInitializer {
pub calls: RefCell<Vec<&'static str>>, pub calls: RefCell<Vec<&'static str>>,
pub buggy_v3_upgrade: bool, pub buggy_v3_upgrade: bool,
} }
impl Default for TestConnectionInitializer {
fn default() -> Self {
Self::new()
}
}
impl TestConnectionInitializer { impl TestConnectionInitializer {
pub fn new() -> Self { pub fn new() -> Self {
let _ = env_logger::try_init();
Self { Self {
calls: RefCell::new(Vec::new()), calls: RefCell::new(Vec::new()),
buggy_v3_upgrade: false, buggy_v3_upgrade: false,
} }
} }
pub fn new_with_buggy_logic() -> Self { pub fn new_with_buggy_logic() -> Self {
let _ = env_logger::try_init();
Self { Self {
calls: RefCell::new(Vec::new()), calls: RefCell::new(Vec::new()),
buggy_v3_upgrade: true, buggy_v3_upgrade: true,
@ -427,6 +358,123 @@ mod test {
} }
} }
// Database file that we can programatically run upgrades on
//
// We purposefully don't keep a connection to the database around to force upgrades to always
// run against a newly opened DB, like they would in the real world. See #4106 for
// details.
pub struct MigratedDatabaseFile<CI: ConnectionInitializer> {
// Keep around a TempDir to ensure the database file stays around until this struct is
// dropped
_tempdir: TempDir,
pub connection_initializer: CI,
pub path: PathBuf,
}
impl<CI: ConnectionInitializer> MigratedDatabaseFile<CI> {
pub fn new(connection_initializer: CI, init_sql: &str) -> Self {
Self::new_with_flags(connection_initializer, init_sql, OpenFlags::default())
}
pub fn new_with_flags(
connection_initializer: CI,
init_sql: &str,
open_flags: OpenFlags,
) -> Self {
let tempdir = tempfile::tempdir().unwrap();
let path = tempdir.path().join(Path::new("db.sql"));
let conn = Connection::open_with_flags(&path, open_flags).unwrap();
conn.execute_batch(init_sql).unwrap();
Self {
_tempdir: tempdir,
connection_initializer,
path,
}
}
/// Attempt to run all upgrades up to a specific version.
///
/// This will result in a panic if an upgrade fails to run.
pub fn upgrade_to(&self, version: u32) {
let mut conn = self.open();
let tx = conn.transaction().unwrap();
let mut current_version = get_schema_version(&tx).unwrap();
while current_version < version {
self.connection_initializer
.upgrade_from(&tx, current_version)
.unwrap();
current_version += 1;
}
set_schema_version(&tx, current_version).unwrap();
self.connection_initializer.finish(&tx).unwrap();
tx.commit().unwrap();
}
/// Attempt to run all upgrades
///
/// This will result in a panic if an upgrade fails to run.
pub fn run_all_upgrades(&self) {
let current_version = get_schema_version(&self.open()).unwrap();
for version in current_version..CI::END_VERSION {
self.upgrade_to(version + 1);
}
}
pub fn assert_schema_matches_new_database(&self) {
let db = self.open();
let new_db = open_memory_database(&self.connection_initializer).unwrap();
let table_names = get_table_names(&db);
let new_db_table_names = get_table_names(&new_db);
let extra_tables = Vec::from_iter(table_names.difference(&new_db_table_names));
if !extra_tables.is_empty() {
panic!("Extra tables not present in new database: {extra_tables:?}");
}
let new_db_extra_tables = Vec::from_iter(new_db_table_names.difference(&table_names));
if !new_db_extra_tables.is_empty() {
panic!("Extra tables only present in new database: {new_db_extra_tables:?}");
}
for table_name in table_names {
assert_eq!(
get_table_sql(&db, &table_name),
get_table_sql(&new_db, &table_name),
"sql differs for table: {table_name}",
);
}
}
pub fn open(&self) -> Connection {
Connection::open(&self.path).unwrap()
}
}
fn get_table_names(conn: &Connection) -> HashSet<String> {
conn.query_rows_and_then(
"SELECT name FROM sqlite_master WHERE type='table'",
(),
|row| row.get(0),
)
.unwrap()
.into_iter()
.collect()
}
fn get_table_sql(conn: &Connection, table_name: &str) -> String {
conn.query_row_and_then(
"SELECT sql FROM sqlite_master WHERE name = ? AND type='table'",
(&table_name,),
|row| row.get::<_, String>(0),
)
.unwrap()
}
}
#[cfg(test)]
mod test {
use super::test_utils::{MigratedDatabaseFile, TestConnectionInitializer};
use super::*;
use std::io::Write;
// A special schema used to test the upgrade that forces the database to be // A special schema used to test the upgrade that forces the database to be
// replaced. // replaced.
static INIT_V1: &str = " static INIT_V1: &str = "

View file

@ -1 +1 @@
{"files":{"Cargo.toml":"05e4d7f7b3649a3e3fa441c4af53a633d18f20bb04fd761ed33fc9d461fd0dee","README.md":"fb72d0028586cab1421b853ef529d7ce78ad7316818b7733a4f3488b0fba67f7","benches/benchmark_all.rs":"c2343c9197b6d9ccb0798d7701b1b0d2569d494dd31a975d21d7ec6f26e32879","build.rs":"78780c5cccfe22c3ff4198624b9e188559c437c3e6fa1c8bb66548eee6aa66bf","src/benchmarks/README.md":"ee6d50df2c31cfd80a5bc047011b518dcf57f1ef928a811bb770f1a09f41b3de","src/benchmarks/client.rs":"5d5db3f6e132654c06532feba15f98576122f6b9572ab5fa27b0c67d5b39ecb6","src/benchmarks/ingest.rs":"1ffdc403fb945ea0b58353df9773ba45ab0e9082d61dd5330ad49fad8cbb5d9f","src/benchmarks/mod.rs":"fe1898ba4d783213525da10d92858ee84cebfd22749bad7aeb461d338fe5504a","src/bin/debug_ingestion_sizes.rs":"ce6e810be7b3fc19e826d75b622b82cfab5a1a99397a6d0833c2c4eebff2d364","src/config.rs":"206ae9dc768c755649cb0c88a7b1fc3c926c715441784f61e9dc06a8a02fc568","src/db.rs":"734f5fd9f36f03c07a508a9a353872b81107f5fe09f27294ba27d7e1249e3988","src/error.rs":"f563210a6c050d98ec85e0f6d9401e7373bfb816e865e8edabbabb23d848ba13","src/keyword.rs":"988d0ab021c0df19cfd3c519df7d37f606bf984cd14d0efca4e5a7aff88344dd","src/lib.rs":"91ebbe0e1ffb99eefde204f81bc6bb199b4941976347baf1f132fd0ede20479c","src/pocket.rs":"1316668840ec9b4ea886223921dc9d3b5a1731d1a5206c0b1089f2a6c45c1b7b","src/provider.rs":"fe76f19a223f5cac056c7d48525087ca2c26bf0629b0e11b1f8dc98d165c8bb2","src/rs.rs":"e3eabde58c859ebe1154bf8da56ca134ace135934e3f280acc8186b4204399b3","src/schema.rs":"8b21006940e872658d722b52ba171280c96789eecf614b837d8cdbc9153ab576","src/store.rs":"413779074db3ce4589c31cd4fb0a050d44d1cbad1df3c94101d03e98efdf09cb","src/suggest.udl":"de50ea5c7ece0ae0ff4798979e0e12a5227b42bf024d48b6f585ea30a5133eb3","src/suggestion.rs":"f31227779d13d1b03a622e08a417ceba4afb161885a01c2bc87a6a652b5e8be5","src/yelp.rs":"9c0dc02a994cc05df524aa4ef337d10f575d1891259193b6419fed6fe279cb54","uniffi.toml":"f26317442ddb5b3281245bef6e60ffcb78bb95d29fe4a351a56dbb88d4ec8aab"},"package":null} {"files":{"Cargo.toml":"05e4d7f7b3649a3e3fa441c4af53a633d18f20bb04fd761ed33fc9d461fd0dee","README.md":"fb72d0028586cab1421b853ef529d7ce78ad7316818b7733a4f3488b0fba67f7","benches/benchmark_all.rs":"c2343c9197b6d9ccb0798d7701b1b0d2569d494dd31a975d21d7ec6f26e32879","build.rs":"78780c5cccfe22c3ff4198624b9e188559c437c3e6fa1c8bb66548eee6aa66bf","src/benchmarks/README.md":"ee6d50df2c31cfd80a5bc047011b518dcf57f1ef928a811bb770f1a09f41b3de","src/benchmarks/client.rs":"4b2125031d740ca1ab468e76bbea777ac0bc4cc221b03b7bc2da773bed61dac5","src/benchmarks/ingest.rs":"1ffdc403fb945ea0b58353df9773ba45ab0e9082d61dd5330ad49fad8cbb5d9f","src/benchmarks/mod.rs":"fe1898ba4d783213525da10d92858ee84cebfd22749bad7aeb461d338fe5504a","src/bin/debug_ingestion_sizes.rs":"ce6e810be7b3fc19e826d75b622b82cfab5a1a99397a6d0833c2c4eebff2d364","src/config.rs":"206ae9dc768c755649cb0c88a7b1fc3c926c715441784f61e9dc06a8a02fc568","src/db.rs":"734f5fd9f36f03c07a508a9a353872b81107f5fe09f27294ba27d7e1249e3988","src/error.rs":"f563210a6c050d98ec85e0f6d9401e7373bfb816e865e8edabbabb23d848ba13","src/keyword.rs":"988d0ab021c0df19cfd3c519df7d37f606bf984cd14d0efca4e5a7aff88344dd","src/lib.rs":"18f988eb49626c6e186c8bc65a51b4a40d796f36d3de8905506f76c6e5e876cd","src/pocket.rs":"1316668840ec9b4ea886223921dc9d3b5a1731d1a5206c0b1089f2a6c45c1b7b","src/provider.rs":"fe76f19a223f5cac056c7d48525087ca2c26bf0629b0e11b1f8dc98d165c8bb2","src/rs.rs":"e3eabde58c859ebe1154bf8da56ca134ace135934e3f280acc8186b4204399b3","src/schema.rs":"88ff3ae6b652fa5a5cff4dc504d11a7fc33f1b2ee9716b970f646d9f9ca90ab7","src/store.rs":"5873438bfc2d2a3e112935bb196bcd1f9b46351d1b341113115f45f7117fc3bf","src/suggest.udl":"b49043c5ec0210aeccf92eadbc1acdce697fc588a2500a281e083b3d8c42ff73","src/suggestion.rs":"f31227779d13d1b03a622e08a417ceba4afb161885a01c2bc87a6a652b5e8be5","src/yelp.rs":"9c0dc02a994cc05df524aa4ef337d10f575d1891259193b6419fed6fe279cb54","uniffi.toml":"f26317442ddb5b3281245bef6e60ffcb78bb95d29fe4a351a56dbb88d4ec8aab"},"package":null}

View file

@ -22,6 +22,7 @@ impl RemoteSettingsWarmUpClient {
pub fn new() -> Self { pub fn new() -> Self {
Self { Self {
client: Client::new(RemoteSettingsConfig { client: Client::new(RemoteSettingsConfig {
server: None,
server_url: None, server_url: None,
bucket_name: None, bucket_name: None,
collection_name: crate::rs::REMOTE_SETTINGS_COLLECTION.into(), collection_name: crate::rs::REMOTE_SETTINGS_COLLECTION.into(),

View file

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
use remote_settings::RemoteSettingsConfig; use remote_settings::{RemoteSettingsConfig, RemoteSettingsServer};
#[cfg(feature = "benchmark_api")] #[cfg(feature = "benchmark_api")]
pub mod benchmarks; pub mod benchmarks;
mod config; mod config;

View file

@ -15,118 +15,118 @@ use sql_support::open_database::{self, ConnectionInitializer};
/// [`SuggestConnectionInitializer::upgrade_from`]. /// [`SuggestConnectionInitializer::upgrade_from`].
/// a. If suggestions should be re-ingested after the migration, call `clear_database()` inside /// a. If suggestions should be re-ingested after the migration, call `clear_database()` inside
/// the migration. /// the migration.
pub const VERSION: u32 = 18; pub const VERSION: u32 = 19;
/// The current Suggest database schema. /// The current Suggest database schema.
pub const SQL: &str = " pub const SQL: &str = "
CREATE TABLE meta( CREATE TABLE meta(
key TEXT PRIMARY KEY, key TEXT PRIMARY KEY,
value NOT NULL value NOT NULL
) WITHOUT ROWID; ) WITHOUT ROWID;
CREATE TABLE keywords( CREATE TABLE keywords(
keyword TEXT NOT NULL, keyword TEXT NOT NULL,
suggestion_id INTEGER NOT NULL REFERENCES suggestions(id) ON DELETE CASCADE, suggestion_id INTEGER NOT NULL REFERENCES suggestions(id) ON DELETE CASCADE,
full_keyword_id INTEGER NULL REFERENCES full_keywords(id) ON DELETE SET NULL, full_keyword_id INTEGER NULL REFERENCES full_keywords(id) ON DELETE SET NULL,
rank INTEGER NOT NULL, rank INTEGER NOT NULL,
PRIMARY KEY (keyword, suggestion_id) PRIMARY KEY (keyword, suggestion_id)
) WITHOUT ROWID; ) WITHOUT ROWID;
-- full keywords are what we display to the user when a (partial) keyword matches -- full keywords are what we display to the user when a (partial) keyword matches
-- The FK to suggestion_id makes it so full keywords get deleted when the parent suggestion is deleted. -- The FK to suggestion_id makes it so full keywords get deleted when the parent suggestion is deleted.
CREATE TABLE full_keywords( CREATE TABLE full_keywords(
id INTEGER PRIMARY KEY, id INTEGER PRIMARY KEY,
suggestion_id INTEGER NOT NULL REFERENCES suggestions(id) ON DELETE CASCADE, suggestion_id INTEGER NOT NULL REFERENCES suggestions(id) ON DELETE CASCADE,
full_keyword TEXT NOT NULL full_keyword TEXT NOT NULL
); );
CREATE TABLE prefix_keywords( CREATE TABLE prefix_keywords(
keyword_prefix TEXT NOT NULL, keyword_prefix TEXT NOT NULL,
keyword_suffix TEXT NOT NULL DEFAULT '', keyword_suffix TEXT NOT NULL DEFAULT '',
confidence INTEGER NOT NULL DEFAULT 0, confidence INTEGER NOT NULL DEFAULT 0,
rank INTEGER NOT NULL, rank INTEGER NOT NULL,
suggestion_id INTEGER NOT NULL REFERENCES suggestions(id) ON DELETE CASCADE, suggestion_id INTEGER NOT NULL REFERENCES suggestions(id) ON DELETE CASCADE,
PRIMARY KEY (keyword_prefix, keyword_suffix, suggestion_id) PRIMARY KEY (keyword_prefix, keyword_suffix, suggestion_id)
) WITHOUT ROWID; ) WITHOUT ROWID;
CREATE UNIQUE INDEX keywords_suggestion_id_rank ON keywords(suggestion_id, rank); CREATE UNIQUE INDEX keywords_suggestion_id_rank ON keywords(suggestion_id, rank);
CREATE TABLE suggestions( CREATE TABLE suggestions(
id INTEGER PRIMARY KEY, id INTEGER PRIMARY KEY,
record_id TEXT NOT NULL, record_id TEXT NOT NULL,
provider INTEGER NOT NULL, provider INTEGER NOT NULL,
title TEXT NOT NULL, title TEXT NOT NULL,
url TEXT NOT NULL, url TEXT NOT NULL,
score REAL NOT NULL score REAL NOT NULL
); );
CREATE TABLE amp_custom_details( CREATE TABLE amp_custom_details(
suggestion_id INTEGER PRIMARY KEY, suggestion_id INTEGER PRIMARY KEY,
advertiser TEXT NOT NULL, advertiser TEXT NOT NULL,
block_id INTEGER NOT NULL, block_id INTEGER NOT NULL,
iab_category TEXT NOT NULL, iab_category TEXT NOT NULL,
impression_url TEXT NOT NULL, impression_url TEXT NOT NULL,
click_url TEXT NOT NULL, click_url TEXT NOT NULL,
icon_id TEXT NOT NULL, icon_id TEXT NOT NULL,
FOREIGN KEY(suggestion_id) REFERENCES suggestions(id) ON DELETE CASCADE FOREIGN KEY(suggestion_id) REFERENCES suggestions(id) ON DELETE CASCADE
); );
CREATE TABLE wikipedia_custom_details( CREATE TABLE wikipedia_custom_details(
suggestion_id INTEGER PRIMARY KEY REFERENCES suggestions(id) ON DELETE CASCADE, suggestion_id INTEGER PRIMARY KEY REFERENCES suggestions(id) ON DELETE CASCADE,
icon_id TEXT NOT NULL icon_id TEXT NOT NULL
); );
CREATE TABLE amo_custom_details( CREATE TABLE amo_custom_details(
suggestion_id INTEGER PRIMARY KEY, suggestion_id INTEGER PRIMARY KEY,
description TEXT NOT NULL, description TEXT NOT NULL,
guid TEXT NOT NULL, guid TEXT NOT NULL,
icon_url TEXT NOT NULL, icon_url TEXT NOT NULL,
rating TEXT, rating TEXT,
number_of_ratings INTEGER NOT NULL, number_of_ratings INTEGER NOT NULL,
FOREIGN KEY(suggestion_id) REFERENCES suggestions(id) ON DELETE CASCADE FOREIGN KEY(suggestion_id) REFERENCES suggestions(id) ON DELETE CASCADE
); );
CREATE INDEX suggestions_record_id ON suggestions(record_id); CREATE INDEX suggestions_record_id ON suggestions(record_id);
CREATE TABLE icons( CREATE TABLE icons(
id TEXT PRIMARY KEY, id TEXT PRIMARY KEY,
data BLOB NOT NULL, data BLOB NOT NULL,
mimetype TEXT NOT NULL mimetype TEXT NOT NULL
) WITHOUT ROWID; ) WITHOUT ROWID;
CREATE TABLE yelp_subjects( CREATE TABLE yelp_subjects(
keyword TEXT PRIMARY KEY, keyword TEXT PRIMARY KEY,
record_id TEXT NOT NULL record_id TEXT NOT NULL
) WITHOUT ROWID; ) WITHOUT ROWID;
CREATE TABLE yelp_modifiers( CREATE TABLE yelp_modifiers(
type INTEGER NOT NULL, type INTEGER NOT NULL,
keyword TEXT NOT NULL, keyword TEXT NOT NULL,
record_id TEXT NOT NULL, record_id TEXT NOT NULL,
PRIMARY KEY (type, keyword) PRIMARY KEY (type, keyword)
) WITHOUT ROWID; ) WITHOUT ROWID;
CREATE TABLE yelp_location_signs( CREATE TABLE yelp_location_signs(
keyword TEXT PRIMARY KEY, keyword TEXT PRIMARY KEY,
need_location INTEGER NOT NULL, need_location INTEGER NOT NULL,
record_id TEXT NOT NULL record_id TEXT NOT NULL
) WITHOUT ROWID; ) WITHOUT ROWID;
CREATE TABLE yelp_custom_details( CREATE TABLE yelp_custom_details(
icon_id TEXT PRIMARY KEY, icon_id TEXT PRIMARY KEY,
score REAL NOT NULL, score REAL NOT NULL,
record_id TEXT NOT NULL record_id TEXT NOT NULL
) WITHOUT ROWID; ) WITHOUT ROWID;
CREATE TABLE mdn_custom_details( CREATE TABLE mdn_custom_details(
suggestion_id INTEGER PRIMARY KEY, suggestion_id INTEGER PRIMARY KEY,
description TEXT NOT NULL, description TEXT NOT NULL,
FOREIGN KEY(suggestion_id) REFERENCES suggestions(id) ON DELETE CASCADE FOREIGN KEY(suggestion_id) REFERENCES suggestions(id) ON DELETE CASCADE
); );
CREATE TABLE dismissed_suggestions ( CREATE TABLE dismissed_suggestions (
url TEXT PRIMARY KEY url TEXT PRIMARY KEY
) WITHOUT ROWID; ) WITHOUT ROWID;
"; ";
/// Initializes an SQLite connection to the Suggest database, performing /// Initializes an SQLite connection to the Suggest database, performing
@ -166,9 +166,9 @@ impl ConnectionInitializer for SuggestConnectionInitializer {
16 => { 16 => {
tx.execute( tx.execute(
" "
CREATE TABLE dismissed_suggestions ( CREATE TABLE dismissed_suggestions (
url_hash INTEGER PRIMARY KEY url_hash INTEGER PRIMARY KEY
) WITHOUT ROWID;", ) WITHOUT ROWID;",
(), (),
)?; )?;
Ok(()) Ok(())
@ -176,14 +176,23 @@ impl ConnectionInitializer for SuggestConnectionInitializer {
17 => { 17 => {
tx.execute( tx.execute(
" "
DROP TABLE dismissed_suggestions; DROP TABLE dismissed_suggestions;
CREATE TABLE dismissed_suggestions ( CREATE TABLE dismissed_suggestions (
url TEXT PRIMARY KEY url TEXT PRIMARY KEY
) WITHOUT ROWID;", ) WITHOUT ROWID;",
(), (),
)?; )?;
Ok(()) Ok(())
} }
18 => {
tx.execute_batch(
"
CREATE TABLE IF NOT EXISTS dismissed_suggestions (
url TEXT PRIMARY KEY
) WITHOUT ROWID;",
)?;
Ok(())
}
_ => Err(open_database::Error::IncompatibleVersion(version)), _ => Err(open_database::Error::IncompatibleVersion(version)),
} }
} }
@ -212,112 +221,112 @@ mod test {
// Snapshot of the v16 schema. We use this to test that we can migrate from there to the // Snapshot of the v16 schema. We use this to test that we can migrate from there to the
// current schema. // current schema.
const V16_SCHEMA: &str = r#" const V16_SCHEMA: &str = r#"
CREATE TABLE meta( CREATE TABLE meta(
key TEXT PRIMARY KEY, key TEXT PRIMARY KEY,
value NOT NULL value NOT NULL
) WITHOUT ROWID; ) WITHOUT ROWID;
CREATE TABLE keywords( CREATE TABLE keywords(
keyword TEXT NOT NULL, keyword TEXT NOT NULL,
suggestion_id INTEGER NOT NULL REFERENCES suggestions(id) ON DELETE CASCADE, suggestion_id INTEGER NOT NULL REFERENCES suggestions(id) ON DELETE CASCADE,
full_keyword_id INTEGER NULL REFERENCES full_keywords(id) ON DELETE SET NULL, full_keyword_id INTEGER NULL REFERENCES full_keywords(id) ON DELETE SET NULL,
rank INTEGER NOT NULL, rank INTEGER NOT NULL,
PRIMARY KEY (keyword, suggestion_id) PRIMARY KEY (keyword, suggestion_id)
) WITHOUT ROWID; ) WITHOUT ROWID;
-- full keywords are what we display to the user when a (partial) keyword matches -- full keywords are what we display to the user when a (partial) keyword matches
-- The FK to suggestion_id makes it so full keywords get deleted when the parent suggestion is deleted. -- The FK to suggestion_id makes it so full keywords get deleted when the parent suggestion is deleted.
CREATE TABLE full_keywords( CREATE TABLE full_keywords(
id INTEGER PRIMARY KEY, id INTEGER PRIMARY KEY,
suggestion_id INTEGER NOT NULL REFERENCES suggestions(id) ON DELETE CASCADE, suggestion_id INTEGER NOT NULL REFERENCES suggestions(id) ON DELETE CASCADE,
full_keyword TEXT NOT NULL full_keyword TEXT NOT NULL
); );
CREATE TABLE prefix_keywords( CREATE TABLE prefix_keywords(
keyword_prefix TEXT NOT NULL, keyword_prefix TEXT NOT NULL,
keyword_suffix TEXT NOT NULL DEFAULT '', keyword_suffix TEXT NOT NULL DEFAULT '',
confidence INTEGER NOT NULL DEFAULT 0, confidence INTEGER NOT NULL DEFAULT 0,
rank INTEGER NOT NULL, rank INTEGER NOT NULL,
suggestion_id INTEGER NOT NULL REFERENCES suggestions(id) ON DELETE CASCADE, suggestion_id INTEGER NOT NULL REFERENCES suggestions(id) ON DELETE CASCADE,
PRIMARY KEY (keyword_prefix, keyword_suffix, suggestion_id) PRIMARY KEY (keyword_prefix, keyword_suffix, suggestion_id)
) WITHOUT ROWID; ) WITHOUT ROWID;
CREATE UNIQUE INDEX keywords_suggestion_id_rank ON keywords(suggestion_id, rank); CREATE UNIQUE INDEX keywords_suggestion_id_rank ON keywords(suggestion_id, rank);
CREATE TABLE suggestions( CREATE TABLE suggestions(
id INTEGER PRIMARY KEY, id INTEGER PRIMARY KEY,
record_id TEXT NOT NULL, record_id TEXT NOT NULL,
provider INTEGER NOT NULL, provider INTEGER NOT NULL,
title TEXT NOT NULL, title TEXT NOT NULL,
url TEXT NOT NULL, url TEXT NOT NULL,
score REAL NOT NULL score REAL NOT NULL
); );
CREATE TABLE amp_custom_details( CREATE TABLE amp_custom_details(
suggestion_id INTEGER PRIMARY KEY, suggestion_id INTEGER PRIMARY KEY,
advertiser TEXT NOT NULL, advertiser TEXT NOT NULL,
block_id INTEGER NOT NULL, block_id INTEGER NOT NULL,
iab_category TEXT NOT NULL, iab_category TEXT NOT NULL,
impression_url TEXT NOT NULL, impression_url TEXT NOT NULL,
click_url TEXT NOT NULL, click_url TEXT NOT NULL,
icon_id TEXT NOT NULL, icon_id TEXT NOT NULL,
FOREIGN KEY(suggestion_id) REFERENCES suggestions(id) ON DELETE CASCADE FOREIGN KEY(suggestion_id) REFERENCES suggestions(id) ON DELETE CASCADE
); );
CREATE TABLE wikipedia_custom_details( CREATE TABLE wikipedia_custom_details(
suggestion_id INTEGER PRIMARY KEY REFERENCES suggestions(id) ON DELETE CASCADE, suggestion_id INTEGER PRIMARY KEY REFERENCES suggestions(id) ON DELETE CASCADE,
icon_id TEXT NOT NULL icon_id TEXT NOT NULL
); );
CREATE TABLE amo_custom_details( CREATE TABLE amo_custom_details(
suggestion_id INTEGER PRIMARY KEY, suggestion_id INTEGER PRIMARY KEY,
description TEXT NOT NULL, description TEXT NOT NULL,
guid TEXT NOT NULL, guid TEXT NOT NULL,
icon_url TEXT NOT NULL, icon_url TEXT NOT NULL,
rating TEXT, rating TEXT,
number_of_ratings INTEGER NOT NULL, number_of_ratings INTEGER NOT NULL,
FOREIGN KEY(suggestion_id) REFERENCES suggestions(id) ON DELETE CASCADE FOREIGN KEY(suggestion_id) REFERENCES suggestions(id) ON DELETE CASCADE
); );
CREATE INDEX suggestions_record_id ON suggestions(record_id); CREATE INDEX suggestions_record_id ON suggestions(record_id);
CREATE TABLE icons( CREATE TABLE icons(
id TEXT PRIMARY KEY, id TEXT PRIMARY KEY,
data BLOB NOT NULL, data BLOB NOT NULL,
mimetype TEXT NOT NULL mimetype TEXT NOT NULL
) WITHOUT ROWID; ) WITHOUT ROWID;
CREATE TABLE yelp_subjects( CREATE TABLE yelp_subjects(
keyword TEXT PRIMARY KEY, keyword TEXT PRIMARY KEY,
record_id TEXT NOT NULL record_id TEXT NOT NULL
) WITHOUT ROWID; ) WITHOUT ROWID;
CREATE TABLE yelp_modifiers( CREATE TABLE yelp_modifiers(
type INTEGER NOT NULL, type INTEGER NOT NULL,
keyword TEXT NOT NULL, keyword TEXT NOT NULL,
record_id TEXT NOT NULL, record_id TEXT NOT NULL,
PRIMARY KEY (type, keyword) PRIMARY KEY (type, keyword)
) WITHOUT ROWID; ) WITHOUT ROWID;
CREATE TABLE yelp_location_signs( CREATE TABLE yelp_location_signs(
keyword TEXT PRIMARY KEY, keyword TEXT PRIMARY KEY,
need_location INTEGER NOT NULL, need_location INTEGER NOT NULL,
record_id TEXT NOT NULL record_id TEXT NOT NULL
) WITHOUT ROWID; ) WITHOUT ROWID;
CREATE TABLE yelp_custom_details( CREATE TABLE yelp_custom_details(
icon_id TEXT PRIMARY KEY, icon_id TEXT PRIMARY KEY,
score REAL NOT NULL, score REAL NOT NULL,
record_id TEXT NOT NULL record_id TEXT NOT NULL
) WITHOUT ROWID; ) WITHOUT ROWID;
CREATE TABLE mdn_custom_details( CREATE TABLE mdn_custom_details(
suggestion_id INTEGER PRIMARY KEY, suggestion_id INTEGER PRIMARY KEY,
description TEXT NOT NULL, description TEXT NOT NULL,
FOREIGN KEY(suggestion_id) REFERENCES suggestions(id) ON DELETE CASCADE FOREIGN KEY(suggestion_id) REFERENCES suggestions(id) ON DELETE CASCADE
); );
PRAGMA user_version=16; PRAGMA user_version=16;
"#; "#;
/// Test running all schema upgrades from V16, which was the first schema with a "real" /// Test running all schema upgrades from V16, which was the first schema with a "real"
@ -328,5 +337,6 @@ mod test {
fn test_all_upgrades() { fn test_all_upgrades() {
let db_file = MigratedDatabaseFile::new(SuggestConnectionInitializer, V16_SCHEMA); let db_file = MigratedDatabaseFile::new(SuggestConnectionInitializer, V16_SCHEMA);
db_file.run_all_upgrades(); db_file.run_all_upgrades();
db_file.assert_schema_matches_new_database();
} }
} }

View file

@ -13,7 +13,8 @@ use error_support::handle_error;
use once_cell::sync::OnceCell; use once_cell::sync::OnceCell;
use parking_lot::Mutex; use parking_lot::Mutex;
use remote_settings::{ use remote_settings::{
self, GetItemsOptions, RemoteSettingsConfig, RemoteSettingsRecord, SortOrder, self, GetItemsOptions, RemoteSettingsConfig, RemoteSettingsRecord, RemoteSettingsServer,
SortOrder,
}; };
use rusqlite::{ use rusqlite::{
types::{FromSql, ToSqlOutput}, types::{FromSql, ToSqlOutput},
@ -50,6 +51,7 @@ pub struct SuggestStoreBuilder(Mutex<SuggestStoreBuilderInner>);
#[derive(Default)] #[derive(Default)]
struct SuggestStoreBuilderInner { struct SuggestStoreBuilderInner {
data_path: Option<String>, data_path: Option<String>,
remote_settings_server: Option<RemoteSettingsServer>,
remote_settings_config: Option<RemoteSettingsConfig>, remote_settings_config: Option<RemoteSettingsConfig>,
} }
@ -79,6 +81,11 @@ impl SuggestStoreBuilder {
self self
} }
pub fn remote_settings_server(self: Arc<Self>, server: RemoteSettingsServer) -> Arc<Self> {
self.0.lock().remote_settings_server = Some(server);
self
}
#[handle_error(Error)] #[handle_error(Error)]
pub fn build(&self) -> SuggestApiResult<Arc<SuggestStore>> { pub fn build(&self) -> SuggestApiResult<Arc<SuggestStore>> {
let inner = self.0.lock(); let inner = self.0.lock();
@ -86,14 +93,29 @@ impl SuggestStoreBuilder {
.data_path .data_path
.clone() .clone()
.ok_or_else(|| Error::SuggestStoreBuilder("data_path not specified".to_owned()))?; .ok_or_else(|| Error::SuggestStoreBuilder("data_path not specified".to_owned()))?;
let settings_client = let remote_settings_config = match (
remote_settings::Client::new(inner.remote_settings_config.clone().unwrap_or_else( inner.remote_settings_server.as_ref(),
|| RemoteSettingsConfig { inner.remote_settings_config.as_ref(),
server_url: None, ) {
bucket_name: None, (Some(server), None) => RemoteSettingsConfig {
collection_name: REMOTE_SETTINGS_COLLECTION.into(), server: Some(server.clone()),
}, server_url: None,
))?; bucket_name: None,
collection_name: REMOTE_SETTINGS_COLLECTION.into(),
},
(None, Some(remote_settings_config)) => remote_settings_config.clone(),
(None, None) => RemoteSettingsConfig {
server: None,
server_url: None,
bucket_name: None,
collection_name: REMOTE_SETTINGS_COLLECTION.into(),
},
(Some(_), Some(_)) => Err(Error::SuggestStoreBuilder(
"can't specify both `remote_settings_server` and `remote_settings_config`"
.to_owned(),
))?,
};
let settings_client = remote_settings::Client::new(remote_settings_config)?;
Ok(Arc::new(SuggestStore { Ok(Arc::new(SuggestStore {
inner: SuggestStoreInner::new(data_path, settings_client), inner: SuggestStoreInner::new(data_path, settings_client),
})) }))
@ -172,6 +194,7 @@ impl SuggestStore {
let settings_client = || -> Result<_> { let settings_client = || -> Result<_> {
Ok(remote_settings::Client::new( Ok(remote_settings::Client::new(
settings_config.unwrap_or_else(|| RemoteSettingsConfig { settings_config.unwrap_or_else(|| RemoteSettingsConfig {
server: None,
server_url: None, server_url: None,
bucket_name: None, bucket_name: None,
collection_name: REMOTE_SETTINGS_COLLECTION.into(), collection_name: REMOTE_SETTINGS_COLLECTION.into(),
@ -5021,10 +5044,10 @@ mod tests {
UnparsableRecords( UnparsableRecords(
{ {
"clippy-2": UnparsableRecord { "clippy-2": UnparsableRecord {
schema_version: 18, schema_version: 19,
}, },
"fancy-new-suggestions-1": UnparsableRecord { "fancy-new-suggestions-1": UnparsableRecord {
schema_version: 18, schema_version: 19,
}, },
}, },
), ),
@ -5093,10 +5116,10 @@ mod tests {
UnparsableRecords( UnparsableRecords(
{ {
"clippy-2": UnparsableRecord { "clippy-2": UnparsableRecord {
schema_version: 18, schema_version: 19,
}, },
"fancy-new-suggestions-1": UnparsableRecord { "fancy-new-suggestions-1": UnparsableRecord {
schema_version: 18, schema_version: 19,
}, },
}, },
), ),
@ -5292,10 +5315,10 @@ mod tests {
UnparsableRecords( UnparsableRecords(
{ {
"clippy-2": UnparsableRecord { "clippy-2": UnparsableRecord {
schema_version: 18, schema_version: 19,
}, },
"fancy-new-suggestions-1": UnparsableRecord { "fancy-new-suggestions-1": UnparsableRecord {
schema_version: 18, schema_version: 19,
}, },
}, },
), ),
@ -5381,7 +5404,7 @@ mod tests {
UnparsableRecords( UnparsableRecords(
{ {
"invalid-attachment": UnparsableRecord { "invalid-attachment": UnparsableRecord {
schema_version: 18, schema_version: 19,
}, },
}, },
), ),

View file

@ -6,6 +6,9 @@
[External="remote_settings"] [External="remote_settings"]
typedef extern RemoteSettingsConfig; typedef extern RemoteSettingsConfig;
[External="remote_settings"]
typedef extern RemoteSettingsServer;
namespace suggest { namespace suggest {
boolean raw_suggestion_url_matches([ByRef] string raw_url, [ByRef] string url); boolean raw_suggestion_url_matches([ByRef] string raw_url, [ByRef] string url);
@ -154,6 +157,10 @@ interface SuggestStoreBuilder {
[Self=ByArc] [Self=ByArc]
SuggestStoreBuilder cache_path(string path); SuggestStoreBuilder cache_path(string path);
[Self=ByArc]
SuggestStoreBuilder remote_settings_server(RemoteSettingsServer server);
// Deprecated: Use `remote_settings_server()` instead.
[Self=ByArc] [Self=ByArc]
SuggestStoreBuilder remote_settings_config(RemoteSettingsConfig config); SuggestStoreBuilder remote_settings_config(RemoteSettingsConfig config);

View file

@ -66,7 +66,7 @@ class RelevancyManager {
* Note that this should be called once only. `#enable` and `#disable` can be * Note that this should be called once only. `#enable` and `#disable` can be
* used to toggle the feature once the manager is initialized. * used to toggle the feature once the manager is initialized.
*/ */
async init() { init() {
if (this.initialized) { if (this.initialized) {
return; return;
} }
@ -74,7 +74,7 @@ class RelevancyManager {
lazy.log.info("Initializing the manager"); lazy.log.info("Initializing the manager");
if (this.shouldEnable) { if (this.shouldEnable) {
await this.#enable(); this.#enable();
} }
this._nimbusUpdateCallback = this.#onNimbusUpdate.bind(this); this._nimbusUpdateCallback = this.#onNimbusUpdate.bind(this);
@ -143,14 +143,14 @@ class RelevancyManager {
); );
} }
async #enable() { #enable() {
if (!this.#_store) { if (!this.#_store) {
// Init the relevancy store. // Init the relevancy store.
const path = this.#storePath; const path = this.#storePath;
lazy.log.info(`Initializing RelevancyStore: ${path}`); lazy.log.info(`Initializing RelevancyStore: ${path}`);
try { try {
this.#_store = await lazy.RelevancyStore.init(path); this.#_store = lazy.RelevancyStore.init(path);
} catch (error) { } catch (error) {
lazy.log.error(`Error initializing RelevancyStore: ${error}`); lazy.log.error(`Error initializing RelevancyStore: ${error}`);
return; return;
@ -166,13 +166,16 @@ class RelevancyManager {
* called. * called.
*/ */
#disable() { #disable() {
this.#_store = null; if (this._isStoreReady) {
this.#_store.close();
this.#_store = null;
}
lazy.timerManager.unregisterTimer(TIMER_ID); lazy.timerManager.unregisterTimer(TIMER_ID);
} }
async #toggleFeature() { #toggleFeature() {
if (this.shouldEnable) { if (this.shouldEnable) {
await this.#enable(); this.#enable();
} else { } else {
this.#disable(); this.#disable();
} }

View file

@ -23,11 +23,11 @@ const CATEGORY_UPDATE_TIMER = "update-timer";
let gSandbox; let gSandbox;
add_setup(async () => { add_setup(() => {
gSandbox = sinon.createSandbox(); gSandbox = sinon.createSandbox();
initUpdateTimerManager(); initUpdateTimerManager();
Services.prefs.setBoolPref(PREF_CONTENT_RELEVANCY_ENABLED, true); Services.prefs.setBoolPref(PREF_CONTENT_RELEVANCY_ENABLED, true);
await ContentRelevancyManager.init(); ContentRelevancyManager.init();
registerCleanupFunction(() => { registerCleanupFunction(() => {
Services.prefs.clearUserPref(PREF_CONTENT_RELEVANCY_ENABLED); Services.prefs.clearUserPref(PREF_CONTENT_RELEVANCY_ENABLED);
@ -35,11 +35,11 @@ add_setup(async () => {
}); });
}); });
add_task(async function test_init() { add_task(function test_init() {
Assert.ok(ContentRelevancyManager.initialized, "Init should succeed"); Assert.ok(ContentRelevancyManager.initialized, "Init should succeed");
}); });
add_task(async function test_uninit() { add_task(function test_uninit() {
ContentRelevancyManager.uninit(); ContentRelevancyManager.uninit();
Assert.ok(!ContentRelevancyManager.initialized, "Uninit should succeed"); Assert.ok(!ContentRelevancyManager.initialized, "Uninit should succeed");
@ -50,7 +50,7 @@ add_task(async function test_timer() {
Services.prefs.setIntPref(PREF_TIMER_INTERVAL, 0); Services.prefs.setIntPref(PREF_TIMER_INTERVAL, 0);
gSandbox.spy(ContentRelevancyManager, "notify"); gSandbox.spy(ContentRelevancyManager, "notify");
await ContentRelevancyManager.init(); ContentRelevancyManager.init();
await TestUtils.waitForCondition( await TestUtils.waitForCondition(
() => ContentRelevancyManager.notify.called, () => ContentRelevancyManager.notify.called,

View file

@ -21,7 +21,7 @@ add_setup(async function setup() {
Services.fog.initializeFOG(); Services.fog.initializeFOG();
Services.prefs.setBoolPref(PREF_CONTENT_RELEVANCY_ENABLED, true); Services.prefs.setBoolPref(PREF_CONTENT_RELEVANCY_ENABLED, true);
await ContentRelevancyManager.init(); ContentRelevancyManager.init();
registerCleanupFunction(() => { registerCleanupFunction(() => {
Services.prefs.clearUserPref(PREF_CONTENT_RELEVANCY_ENABLED); Services.prefs.clearUserPref(PREF_CONTENT_RELEVANCY_ENABLED);

View file

@ -316,10 +316,9 @@ export class RelevancyStore {
this[uniffiObjectPtr] = opts[constructUniffiObject]; this[uniffiObjectPtr] = opts[constructUniffiObject];
} }
/** /**
* An async constructor for RelevancyStore. * A constructor for RelevancyStore.
* *
* @returns {Promise<RelevancyStore>}: A promise that resolves * @returns { RelevancyStore }
* to a newly constructed RelevancyStore
*/ */
static init(dbpath) { static init(dbpath) {
const liftResult = (result) => FfiConverterTypeRelevancyStore.lift(result); const liftResult = (result) => FfiConverterTypeRelevancyStore.lift(result);
@ -333,16 +332,12 @@ export class RelevancyStore {
} }
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callSync(
1, // relevancy:uniffi_relevancy_fn_constructor_relevancystore_new 1, // relevancy:uniffi_relevancy_fn_constructor_relevancystore_new
FfiConverterString.lower(dbpath), FfiConverterString.lower(dbpath),
) )
} }
try { return handleRustResult(functionCall(), liftResult, liftError);}
return functionCall().then((result) => handleRustResult(result, liftResult, liftError));
} catch (error) {
return Promise.reject(error)
}}
calculateMetrics() { calculateMetrics() {
const liftResult = (result) => FfiConverterTypeInterestMetrics.lift(result); const liftResult = (result) => FfiConverterTypeInterestMetrics.lift(result);
@ -360,6 +355,18 @@ export class RelevancyStore {
} }
} }
close() {
const liftResult = (result) => undefined;
const liftError = null;
const functionCall = () => {
return UniFFIScaffolding.callSync(
3, // relevancy:uniffi_relevancy_fn_method_relevancystore_close
FfiConverterTypeRelevancyStore.lower(this),
)
}
return handleRustResult(functionCall(), liftResult, liftError);
}
ingest(topUrls) { ingest(topUrls) {
const liftResult = (result) => undefined; const liftResult = (result) => undefined;
const liftError = (data) => FfiConverterTypeRelevancyApiError.lift(data); const liftError = (data) => FfiConverterTypeRelevancyApiError.lift(data);
@ -373,7 +380,7 @@ export class RelevancyStore {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
3, // relevancy:uniffi_relevancy_fn_method_relevancystore_ingest 4, // relevancy:uniffi_relevancy_fn_method_relevancystore_ingest
FfiConverterTypeRelevancyStore.lower(this), FfiConverterTypeRelevancyStore.lower(this),
FfiConverterSequencestring.lower(topUrls), FfiConverterSequencestring.lower(topUrls),
) )
@ -385,12 +392,24 @@ export class RelevancyStore {
} }
} }
interrupt() {
const liftResult = (result) => undefined;
const liftError = null;
const functionCall = () => {
return UniFFIScaffolding.callSync(
5, // relevancy:uniffi_relevancy_fn_method_relevancystore_interrupt
FfiConverterTypeRelevancyStore.lower(this),
)
}
return handleRustResult(functionCall(), liftResult, liftError);
}
userInterestVector() { userInterestVector() {
const liftResult = (result) => FfiConverterTypeInterestVector.lift(result); const liftResult = (result) => FfiConverterTypeInterestVector.lift(result);
const liftError = (data) => FfiConverterTypeRelevancyApiError.lift(data); const liftError = (data) => FfiConverterTypeRelevancyApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
4, // relevancy:uniffi_relevancy_fn_method_relevancystore_user_interest_vector 6, // relevancy:uniffi_relevancy_fn_method_relevancystore_user_interest_vector
FfiConverterTypeRelevancyStore.lower(this), FfiConverterTypeRelevancyStore.lower(this),
) )
} }
@ -527,7 +546,7 @@ export class FfiConverterTypeInterestMetrics extends FfiConverterArrayBuffer {
} }
export class InterestVector { export class InterestVector {
constructor({ animals, arts, autos, business, career, education, fashion, finance, food, government, health, hobbies, home, news, realEstate, society, sports, tech, travel, inconclusive } = {}) { constructor({ animals, arts, autos, business, career, education, fashion, finance, food, government, hobbies, home, news, realEstate, society, sports, tech, travel, inconclusive } = {}) {
try { try {
FfiConverterU32.checkType(animals) FfiConverterU32.checkType(animals)
} catch (e) { } catch (e) {
@ -608,14 +627,6 @@ export class InterestVector {
} }
throw e; throw e;
} }
try {
FfiConverterU32.checkType(health)
} catch (e) {
if (e instanceof UniFFITypeError) {
e.addItemDescriptionPart("health");
}
throw e;
}
try { try {
FfiConverterU32.checkType(hobbies) FfiConverterU32.checkType(hobbies)
} catch (e) { } catch (e) {
@ -698,7 +709,6 @@ export class InterestVector {
this.finance = finance; this.finance = finance;
this.food = food; this.food = food;
this.government = government; this.government = government;
this.health = health;
this.hobbies = hobbies; this.hobbies = hobbies;
this.home = home; this.home = home;
this.news = news; this.news = news;
@ -721,7 +731,6 @@ export class InterestVector {
this.finance == other.finance && this.finance == other.finance &&
this.food == other.food && this.food == other.food &&
this.government == other.government && this.government == other.government &&
this.health == other.health &&
this.hobbies == other.hobbies && this.hobbies == other.hobbies &&
this.home == other.home && this.home == other.home &&
this.news == other.news && this.news == other.news &&
@ -749,7 +758,6 @@ export class FfiConverterTypeInterestVector extends FfiConverterArrayBuffer {
finance: FfiConverterU32.read(dataStream), finance: FfiConverterU32.read(dataStream),
food: FfiConverterU32.read(dataStream), food: FfiConverterU32.read(dataStream),
government: FfiConverterU32.read(dataStream), government: FfiConverterU32.read(dataStream),
health: FfiConverterU32.read(dataStream),
hobbies: FfiConverterU32.read(dataStream), hobbies: FfiConverterU32.read(dataStream),
home: FfiConverterU32.read(dataStream), home: FfiConverterU32.read(dataStream),
news: FfiConverterU32.read(dataStream), news: FfiConverterU32.read(dataStream),
@ -772,7 +780,6 @@ export class FfiConverterTypeInterestVector extends FfiConverterArrayBuffer {
FfiConverterU32.write(dataStream, value.finance); FfiConverterU32.write(dataStream, value.finance);
FfiConverterU32.write(dataStream, value.food); FfiConverterU32.write(dataStream, value.food);
FfiConverterU32.write(dataStream, value.government); FfiConverterU32.write(dataStream, value.government);
FfiConverterU32.write(dataStream, value.health);
FfiConverterU32.write(dataStream, value.hobbies); FfiConverterU32.write(dataStream, value.hobbies);
FfiConverterU32.write(dataStream, value.home); FfiConverterU32.write(dataStream, value.home);
FfiConverterU32.write(dataStream, value.news); FfiConverterU32.write(dataStream, value.news);
@ -796,7 +803,6 @@ export class FfiConverterTypeInterestVector extends FfiConverterArrayBuffer {
totalSize += FfiConverterU32.computeSize(value.finance); totalSize += FfiConverterU32.computeSize(value.finance);
totalSize += FfiConverterU32.computeSize(value.food); totalSize += FfiConverterU32.computeSize(value.food);
totalSize += FfiConverterU32.computeSize(value.government); totalSize += FfiConverterU32.computeSize(value.government);
totalSize += FfiConverterU32.computeSize(value.health);
totalSize += FfiConverterU32.computeSize(value.hobbies); totalSize += FfiConverterU32.computeSize(value.hobbies);
totalSize += FfiConverterU32.computeSize(value.home); totalSize += FfiConverterU32.computeSize(value.home);
totalSize += FfiConverterU32.computeSize(value.news); totalSize += FfiConverterU32.computeSize(value.news);
@ -894,14 +900,6 @@ export class FfiConverterTypeInterestVector extends FfiConverterArrayBuffer {
} }
throw e; throw e;
} }
try {
FfiConverterU32.checkType(value.health);
} catch (e) {
if (e instanceof UniFFITypeError) {
e.addItemDescriptionPart(".health");
}
throw e;
}
try { try {
FfiConverterU32.checkType(value.hobbies); FfiConverterU32.checkType(value.hobbies);
} catch (e) { } catch (e) {
@ -989,16 +987,15 @@ export const Interest = {
FINANCE: 8, FINANCE: 8,
FOOD: 9, FOOD: 9,
GOVERNMENT: 10, GOVERNMENT: 10,
HEALTH: 11, HOBBIES: 11,
HOBBIES: 12, HOME: 12,
HOME: 13, NEWS: 13,
NEWS: 14, REAL_ESTATE: 14,
REAL_ESTATE: 15, SOCIETY: 15,
SOCIETY: 16, SPORTS: 16,
SPORTS: 17, TECH: 17,
TECH: 18, TRAVEL: 18,
TRAVEL: 19, INCONCLUSIVE: 19,
INCONCLUSIVE: 20,
}; };
Object.freeze(Interest); Object.freeze(Interest);
@ -1027,24 +1024,22 @@ export class FfiConverterTypeInterest extends FfiConverterArrayBuffer {
case 10: case 10:
return Interest.GOVERNMENT return Interest.GOVERNMENT
case 11: case 11:
return Interest.HEALTH
case 12:
return Interest.HOBBIES return Interest.HOBBIES
case 13: case 12:
return Interest.HOME return Interest.HOME
case 14: case 13:
return Interest.NEWS return Interest.NEWS
case 15: case 14:
return Interest.REAL_ESTATE return Interest.REAL_ESTATE
case 16: case 15:
return Interest.SOCIETY return Interest.SOCIETY
case 17: case 16:
return Interest.SPORTS return Interest.SPORTS
case 18: case 17:
return Interest.TECH return Interest.TECH
case 19: case 18:
return Interest.TRAVEL return Interest.TRAVEL
case 20: case 19:
return Interest.INCONCLUSIVE return Interest.INCONCLUSIVE
default: default:
throw new UniFFITypeError("Unknown Interest variant"); throw new UniFFITypeError("Unknown Interest variant");
@ -1092,44 +1087,40 @@ export class FfiConverterTypeInterest extends FfiConverterArrayBuffer {
dataStream.writeInt32(10); dataStream.writeInt32(10);
return; return;
} }
if (value === Interest.HEALTH) { if (value === Interest.HOBBIES) {
dataStream.writeInt32(11); dataStream.writeInt32(11);
return; return;
} }
if (value === Interest.HOBBIES) { if (value === Interest.HOME) {
dataStream.writeInt32(12); dataStream.writeInt32(12);
return; return;
} }
if (value === Interest.HOME) { if (value === Interest.NEWS) {
dataStream.writeInt32(13); dataStream.writeInt32(13);
return; return;
} }
if (value === Interest.NEWS) { if (value === Interest.REAL_ESTATE) {
dataStream.writeInt32(14); dataStream.writeInt32(14);
return; return;
} }
if (value === Interest.REAL_ESTATE) { if (value === Interest.SOCIETY) {
dataStream.writeInt32(15); dataStream.writeInt32(15);
return; return;
} }
if (value === Interest.SOCIETY) { if (value === Interest.SPORTS) {
dataStream.writeInt32(16); dataStream.writeInt32(16);
return; return;
} }
if (value === Interest.SPORTS) { if (value === Interest.TECH) {
dataStream.writeInt32(17); dataStream.writeInt32(17);
return; return;
} }
if (value === Interest.TECH) { if (value === Interest.TRAVEL) {
dataStream.writeInt32(18); dataStream.writeInt32(18);
return; return;
} }
if (value === Interest.TRAVEL) {
dataStream.writeInt32(19);
return;
}
if (value === Interest.INCONCLUSIVE) { if (value === Interest.INCONCLUSIVE) {
dataStream.writeInt32(20); dataStream.writeInt32(19);
return; return;
} }
throw new UniFFITypeError("Unknown Interest variant"); throw new UniFFITypeError("Unknown Interest variant");
@ -1140,7 +1131,7 @@ export class FfiConverterTypeInterest extends FfiConverterArrayBuffer {
} }
static checkType(value) { static checkType(value) {
if (!Number.isInteger(value) || value < 1 || value > 20) { if (!Number.isInteger(value) || value < 1 || value > 19) {
throw new UniFFITypeError(`${value} is not a valid value for Interest`); throw new UniFFITypeError(`${value} is not a valid value for Interest`);
} }
} }

View file

@ -356,7 +356,7 @@ export class RemoteSettings {
throw e; throw e;
} }
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
6, // remote_settings:uniffi_remote_settings_fn_constructor_remotesettings_new 8, // remote_settings:uniffi_remote_settings_fn_constructor_remotesettings_new
FfiConverterTypeRemoteSettingsConfig.lower(remoteSettingsConfig), FfiConverterTypeRemoteSettingsConfig.lower(remoteSettingsConfig),
) )
} }
@ -383,7 +383,7 @@ export class RemoteSettings {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
7, // remote_settings:uniffi_remote_settings_fn_method_remotesettings_download_attachment_to_path 9, // remote_settings:uniffi_remote_settings_fn_method_remotesettings_download_attachment_to_path
FfiConverterTypeRemoteSettings.lower(this), FfiConverterTypeRemoteSettings.lower(this),
FfiConverterString.lower(attachmentId), FfiConverterString.lower(attachmentId),
FfiConverterString.lower(path), FfiConverterString.lower(path),
@ -401,7 +401,7 @@ export class RemoteSettings {
const liftError = (data) => FfiConverterTypeRemoteSettingsError.lift(data); const liftError = (data) => FfiConverterTypeRemoteSettingsError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
8, // remote_settings:uniffi_remote_settings_fn_method_remotesettings_get_records 10, // remote_settings:uniffi_remote_settings_fn_method_remotesettings_get_records
FfiConverterTypeRemoteSettings.lower(this), FfiConverterTypeRemoteSettings.lower(this),
) )
} }
@ -425,7 +425,7 @@ export class RemoteSettings {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
9, // remote_settings:uniffi_remote_settings_fn_method_remotesettings_get_records_since 11, // remote_settings:uniffi_remote_settings_fn_method_remotesettings_get_records_since
FfiConverterTypeRemoteSettings.lower(this), FfiConverterTypeRemoteSettings.lower(this),
FfiConverterU64.lower(timestamp), FfiConverterU64.lower(timestamp),
) )
@ -605,7 +605,7 @@ export class FfiConverterTypeAttachment extends FfiConverterArrayBuffer {
} }
export class RemoteSettingsConfig { export class RemoteSettingsConfig {
constructor({ collectionName, bucketName = null, serverUrl = null } = {}) { constructor({ collectionName, bucketName = null, serverUrl = null, server = null } = {}) {
try { try {
FfiConverterString.checkType(collectionName) FfiConverterString.checkType(collectionName)
} catch (e) { } catch (e) {
@ -630,15 +630,25 @@ export class RemoteSettingsConfig {
} }
throw e; throw e;
} }
try {
FfiConverterOptionalTypeRemoteSettingsServer.checkType(server)
} catch (e) {
if (e instanceof UniFFITypeError) {
e.addItemDescriptionPart("server");
}
throw e;
}
this.collectionName = collectionName; this.collectionName = collectionName;
this.bucketName = bucketName; this.bucketName = bucketName;
this.serverUrl = serverUrl; this.serverUrl = serverUrl;
this.server = server;
} }
equals(other) { equals(other) {
return ( return (
this.collectionName == other.collectionName && this.collectionName == other.collectionName &&
this.bucketName == other.bucketName && this.bucketName == other.bucketName &&
this.serverUrl == other.serverUrl this.serverUrl == other.serverUrl &&
this.server == other.server
) )
} }
} }
@ -650,12 +660,14 @@ export class FfiConverterTypeRemoteSettingsConfig extends FfiConverterArrayBuffe
collectionName: FfiConverterString.read(dataStream), collectionName: FfiConverterString.read(dataStream),
bucketName: FfiConverterOptionalstring.read(dataStream), bucketName: FfiConverterOptionalstring.read(dataStream),
serverUrl: FfiConverterOptionalstring.read(dataStream), serverUrl: FfiConverterOptionalstring.read(dataStream),
server: FfiConverterOptionalTypeRemoteSettingsServer.read(dataStream),
}); });
} }
static write(dataStream, value) { static write(dataStream, value) {
FfiConverterString.write(dataStream, value.collectionName); FfiConverterString.write(dataStream, value.collectionName);
FfiConverterOptionalstring.write(dataStream, value.bucketName); FfiConverterOptionalstring.write(dataStream, value.bucketName);
FfiConverterOptionalstring.write(dataStream, value.serverUrl); FfiConverterOptionalstring.write(dataStream, value.serverUrl);
FfiConverterOptionalTypeRemoteSettingsServer.write(dataStream, value.server);
} }
static computeSize(value) { static computeSize(value) {
@ -663,6 +675,7 @@ export class FfiConverterTypeRemoteSettingsConfig extends FfiConverterArrayBuffe
totalSize += FfiConverterString.computeSize(value.collectionName); totalSize += FfiConverterString.computeSize(value.collectionName);
totalSize += FfiConverterOptionalstring.computeSize(value.bucketName); totalSize += FfiConverterOptionalstring.computeSize(value.bucketName);
totalSize += FfiConverterOptionalstring.computeSize(value.serverUrl); totalSize += FfiConverterOptionalstring.computeSize(value.serverUrl);
totalSize += FfiConverterOptionalTypeRemoteSettingsServer.computeSize(value.server);
return totalSize return totalSize
} }
@ -695,6 +708,14 @@ export class FfiConverterTypeRemoteSettingsConfig extends FfiConverterArrayBuffe
} }
throw e; throw e;
} }
try {
FfiConverterOptionalTypeRemoteSettingsServer.checkType(value.server);
} catch (e) {
if (e instanceof UniFFITypeError) {
e.addItemDescriptionPart(".server");
}
throw e;
}
} }
} }
@ -990,6 +1011,17 @@ export class AttachmentsUnsupportedError extends RemoteSettingsError {
} }
} }
export class ConfigError extends RemoteSettingsError {
constructor(message, ...params) {
super(...params);
this.message = message;
}
toString() {
return `ConfigError: ${super.toString()}`
}
}
// Export the FFIConverter object to make external types work. // Export the FFIConverter object to make external types work.
export class FfiConverterTypeRemoteSettingsError extends FfiConverterArrayBuffer { export class FfiConverterTypeRemoteSettingsError extends FfiConverterArrayBuffer {
static read(dataStream) { static read(dataStream) {
@ -1008,6 +1040,8 @@ export class FfiConverterTypeRemoteSettingsError extends FfiConverterArrayBuffer
return new ResponseError(FfiConverterString.read(dataStream)); return new ResponseError(FfiConverterString.read(dataStream));
case 7: case 7:
return new AttachmentsUnsupportedError(FfiConverterString.read(dataStream)); return new AttachmentsUnsupportedError(FfiConverterString.read(dataStream));
case 8:
return new ConfigError(FfiConverterString.read(dataStream));
default: default:
throw new UniFFITypeError("Unknown RemoteSettingsError variant"); throw new UniFFITypeError("Unknown RemoteSettingsError variant");
} }
@ -1036,6 +1070,9 @@ export class FfiConverterTypeRemoteSettingsError extends FfiConverterArrayBuffer
if (value instanceof AttachmentsUnsupportedError) { if (value instanceof AttachmentsUnsupportedError) {
return totalSize; return totalSize;
} }
if (value instanceof ConfigError) {
return totalSize;
}
throw new UniFFITypeError("Unknown RemoteSettingsError variant"); throw new UniFFITypeError("Unknown RemoteSettingsError variant");
} }
static write(dataStream, value) { static write(dataStream, value) {
@ -1067,12 +1104,115 @@ export class FfiConverterTypeRemoteSettingsError extends FfiConverterArrayBuffer
dataStream.writeInt32(7); dataStream.writeInt32(7);
return; return;
} }
if (value instanceof ConfigError) {
dataStream.writeInt32(8);
return;
}
throw new UniFFITypeError("Unknown RemoteSettingsError variant"); throw new UniFFITypeError("Unknown RemoteSettingsError variant");
} }
static errorClass = RemoteSettingsError; static errorClass = RemoteSettingsError;
} }
export class RemoteSettingsServer {}
RemoteSettingsServer.Prod = class extends RemoteSettingsServer{
constructor(
) {
super();
}
}
RemoteSettingsServer.Stage = class extends RemoteSettingsServer{
constructor(
) {
super();
}
}
RemoteSettingsServer.Dev = class extends RemoteSettingsServer{
constructor(
) {
super();
}
}
RemoteSettingsServer.Custom = class extends RemoteSettingsServer{
constructor(
url
) {
super();
this.url = url;
}
}
// Export the FFIConverter object to make external types work.
export class FfiConverterTypeRemoteSettingsServer extends FfiConverterArrayBuffer {
static read(dataStream) {
switch (dataStream.readInt32()) {
case 1:
return new RemoteSettingsServer.Prod(
);
case 2:
return new RemoteSettingsServer.Stage(
);
case 3:
return new RemoteSettingsServer.Dev(
);
case 4:
return new RemoteSettingsServer.Custom(
FfiConverterString.read(dataStream)
);
default:
throw new UniFFITypeError("Unknown RemoteSettingsServer variant");
}
}
static write(dataStream, value) {
if (value instanceof RemoteSettingsServer.Prod) {
dataStream.writeInt32(1);
return;
}
if (value instanceof RemoteSettingsServer.Stage) {
dataStream.writeInt32(2);
return;
}
if (value instanceof RemoteSettingsServer.Dev) {
dataStream.writeInt32(3);
return;
}
if (value instanceof RemoteSettingsServer.Custom) {
dataStream.writeInt32(4);
FfiConverterString.write(dataStream, value.url);
return;
}
throw new UniFFITypeError("Unknown RemoteSettingsServer variant");
}
static computeSize(value) {
// Size of the Int indicating the variant
let totalSize = 4;
if (value instanceof RemoteSettingsServer.Prod) {
return totalSize;
}
if (value instanceof RemoteSettingsServer.Stage) {
return totalSize;
}
if (value instanceof RemoteSettingsServer.Dev) {
return totalSize;
}
if (value instanceof RemoteSettingsServer.Custom) {
totalSize += FfiConverterString.computeSize(value.url);
return totalSize;
}
throw new UniFFITypeError("Unknown RemoteSettingsServer variant");
}
static checkType(value) {
if (!(value instanceof RemoteSettingsServer)) {
throw new UniFFITypeError(`${value} is not a subclass instance of RemoteSettingsServer`);
}
}
}
// Export the FFIConverter object to make external types work. // Export the FFIConverter object to make external types work.
export class FfiConverterOptionalstring extends FfiConverterArrayBuffer { export class FfiConverterOptionalstring extends FfiConverterArrayBuffer {
static checkType(value) { static checkType(value) {
@ -1147,6 +1287,43 @@ export class FfiConverterOptionalTypeAttachment extends FfiConverterArrayBuffer
} }
} }
// Export the FFIConverter object to make external types work.
export class FfiConverterOptionalTypeRemoteSettingsServer extends FfiConverterArrayBuffer {
static checkType(value) {
if (value !== undefined && value !== null) {
FfiConverterTypeRemoteSettingsServer.checkType(value)
}
}
static read(dataStream) {
const code = dataStream.readUint8(0);
switch (code) {
case 0:
return null
case 1:
return FfiConverterTypeRemoteSettingsServer.read(dataStream)
default:
throw UniFFIError(`Unexpected code: ${code}`);
}
}
static write(dataStream, value) {
if (value === null || value === undefined) {
dataStream.writeUint8(0);
return;
}
dataStream.writeUint8(1);
FfiConverterTypeRemoteSettingsServer.write(dataStream, value)
}
static computeSize(value) {
if (value === null || value === undefined) {
return 1;
}
return 1 + FfiConverterTypeRemoteSettingsServer.computeSize(value)
}
}
// Export the FFIConverter object to make external types work. // Export the FFIConverter object to make external types work.
export class FfiConverterSequenceTypeRemoteSettingsRecord extends FfiConverterArrayBuffer { export class FfiConverterSequenceTypeRemoteSettingsRecord extends FfiConverterArrayBuffer {
static read(dataStream) { static read(dataStream) {

View file

@ -484,7 +484,7 @@ export class SuggestStore {
throw e; throw e;
} }
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
11, // suggest:uniffi_suggest_fn_constructor_suggeststore_new 13, // suggest:uniffi_suggest_fn_constructor_suggeststore_new
FfiConverterString.lower(path), FfiConverterString.lower(path),
FfiConverterOptionalTypeRemoteSettingsConfig.lower(settingsConfig), FfiConverterOptionalTypeRemoteSettingsConfig.lower(settingsConfig),
) )
@ -496,7 +496,7 @@ export class SuggestStore {
const liftError = (data) => FfiConverterTypeSuggestApiError.lift(data); const liftError = (data) => FfiConverterTypeSuggestApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
12, // suggest:uniffi_suggest_fn_method_suggeststore_clear 14, // suggest:uniffi_suggest_fn_method_suggeststore_clear
FfiConverterTypeSuggestStore.lower(this), FfiConverterTypeSuggestStore.lower(this),
) )
} }
@ -512,7 +512,7 @@ export class SuggestStore {
const liftError = (data) => FfiConverterTypeSuggestApiError.lift(data); const liftError = (data) => FfiConverterTypeSuggestApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
13, // suggest:uniffi_suggest_fn_method_suggeststore_clear_dismissed_suggestions 15, // suggest:uniffi_suggest_fn_method_suggeststore_clear_dismissed_suggestions
FfiConverterTypeSuggestStore.lower(this), FfiConverterTypeSuggestStore.lower(this),
) )
} }
@ -536,7 +536,7 @@ export class SuggestStore {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
14, // suggest:uniffi_suggest_fn_method_suggeststore_dismiss_suggestion 16, // suggest:uniffi_suggest_fn_method_suggeststore_dismiss_suggestion
FfiConverterTypeSuggestStore.lower(this), FfiConverterTypeSuggestStore.lower(this),
FfiConverterString.lower(rawSuggestionUrl), FfiConverterString.lower(rawSuggestionUrl),
) )
@ -553,7 +553,7 @@ export class SuggestStore {
const liftError = (data) => FfiConverterTypeSuggestApiError.lift(data); const liftError = (data) => FfiConverterTypeSuggestApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
15, // suggest:uniffi_suggest_fn_method_suggeststore_fetch_global_config 17, // suggest:uniffi_suggest_fn_method_suggeststore_fetch_global_config
FfiConverterTypeSuggestStore.lower(this), FfiConverterTypeSuggestStore.lower(this),
) )
} }
@ -577,7 +577,7 @@ export class SuggestStore {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
16, // suggest:uniffi_suggest_fn_method_suggeststore_fetch_provider_config 18, // suggest:uniffi_suggest_fn_method_suggeststore_fetch_provider_config
FfiConverterTypeSuggestStore.lower(this), FfiConverterTypeSuggestStore.lower(this),
FfiConverterTypeSuggestionProvider.lower(provider), FfiConverterTypeSuggestionProvider.lower(provider),
) )
@ -602,7 +602,7 @@ export class SuggestStore {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
17, // suggest:uniffi_suggest_fn_method_suggeststore_ingest 19, // suggest:uniffi_suggest_fn_method_suggeststore_ingest
FfiConverterTypeSuggestStore.lower(this), FfiConverterTypeSuggestStore.lower(this),
FfiConverterTypeSuggestIngestionConstraints.lower(constraints), FfiConverterTypeSuggestIngestionConstraints.lower(constraints),
) )
@ -619,7 +619,7 @@ export class SuggestStore {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
18, // suggest:uniffi_suggest_fn_method_suggeststore_interrupt 20, // suggest:uniffi_suggest_fn_method_suggeststore_interrupt
FfiConverterTypeSuggestStore.lower(this), FfiConverterTypeSuggestStore.lower(this),
) )
} }
@ -639,7 +639,7 @@ export class SuggestStore {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
19, // suggest:uniffi_suggest_fn_method_suggeststore_query 21, // suggest:uniffi_suggest_fn_method_suggeststore_query
FfiConverterTypeSuggestStore.lower(this), FfiConverterTypeSuggestStore.lower(this),
FfiConverterTypeSuggestionQuery.lower(query), FfiConverterTypeSuggestionQuery.lower(query),
) )
@ -706,7 +706,7 @@ export class SuggestStoreBuilder {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
21, // suggest:uniffi_suggest_fn_constructor_suggeststorebuilder_new 23, // suggest:uniffi_suggest_fn_constructor_suggeststorebuilder_new
) )
} }
try { try {
@ -720,7 +720,7 @@ export class SuggestStoreBuilder {
const liftError = (data) => FfiConverterTypeSuggestApiError.lift(data); const liftError = (data) => FfiConverterTypeSuggestApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
22, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_build 24, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_build
FfiConverterTypeSuggestStoreBuilder.lower(this), FfiConverterTypeSuggestStoreBuilder.lower(this),
) )
} }
@ -744,7 +744,7 @@ export class SuggestStoreBuilder {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
23, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_cache_path 25, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_cache_path
FfiConverterTypeSuggestStoreBuilder.lower(this), FfiConverterTypeSuggestStoreBuilder.lower(this),
FfiConverterString.lower(path), FfiConverterString.lower(path),
) )
@ -769,7 +769,7 @@ export class SuggestStoreBuilder {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
24, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_data_path 26, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_data_path
FfiConverterTypeSuggestStoreBuilder.lower(this), FfiConverterTypeSuggestStoreBuilder.lower(this),
FfiConverterString.lower(path), FfiConverterString.lower(path),
) )
@ -794,7 +794,7 @@ export class SuggestStoreBuilder {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
25, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_config 27, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_config
FfiConverterTypeSuggestStoreBuilder.lower(this), FfiConverterTypeSuggestStoreBuilder.lower(this),
FfiConverterTypeRemoteSettingsConfig.lower(config), FfiConverterTypeRemoteSettingsConfig.lower(config),
) )
@ -806,6 +806,31 @@ export class SuggestStoreBuilder {
} }
} }
remoteSettingsServer(server) {
const liftResult = (result) => FfiConverterTypeSuggestStoreBuilder.lift(result);
const liftError = null;
const functionCall = () => {
try {
FfiConverterTypeRemoteSettingsServer.checkType(server)
} catch (e) {
if (e instanceof UniFFITypeError) {
e.addItemDescriptionPart("server");
}
throw e;
}
return UniFFIScaffolding.callAsync(
28, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_server
FfiConverterTypeSuggestStoreBuilder.lower(this),
FfiConverterTypeRemoteSettingsServer.lower(server),
)
}
try {
return functionCall().then((result) => handleRustResult(result, liftResult, liftError));
} catch (error) {
return Promise.reject(error)
}
}
} }
// Export the FFIConverter object to make external types work. // Export the FFIConverter object to make external types work.
@ -2078,6 +2103,14 @@ import {
// Export the FFIConverter object to make external types work. // Export the FFIConverter object to make external types work.
export { FfiConverterTypeRemoteSettingsConfig, RemoteSettingsConfig }; export { FfiConverterTypeRemoteSettingsConfig, RemoteSettingsConfig };
import {
FfiConverterTypeRemoteSettingsServer,
RemoteSettingsServer,
} from "resource://gre/modules/RustRemoteSettings.sys.mjs";
// Export the FFIConverter object to make external types work.
export { FfiConverterTypeRemoteSettingsServer, RemoteSettingsServer };
@ -2104,7 +2137,7 @@ export function rawSuggestionUrlMatches(rawUrl,url) {
throw e; throw e;
} }
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
26, // suggest:uniffi_suggest_fn_func_raw_suggestion_url_matches 29, // suggest:uniffi_suggest_fn_func_raw_suggestion_url_matches
FfiConverterString.lower(rawUrl), FfiConverterString.lower(rawUrl),
FfiConverterString.lower(url), FfiConverterString.lower(url),
) )

View file

@ -361,7 +361,7 @@ export class TabsBridgedEngine {
const liftError = (data) => FfiConverterTypeTabsApiError.lift(data); const liftError = (data) => FfiConverterTypeTabsApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
28, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_apply 31, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_apply
FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterTypeTabsBridgedEngine.lower(this),
) )
} }
@ -385,7 +385,7 @@ export class TabsBridgedEngine {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
29, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_ensure_current_sync_id 32, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_ensure_current_sync_id
FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterTypeTabsBridgedEngine.lower(this),
FfiConverterString.lower(newSyncId), FfiConverterString.lower(newSyncId),
) )
@ -402,7 +402,7 @@ export class TabsBridgedEngine {
const liftError = (data) => FfiConverterTypeTabsApiError.lift(data); const liftError = (data) => FfiConverterTypeTabsApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
30, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_last_sync 33, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_last_sync
FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterTypeTabsBridgedEngine.lower(this),
) )
} }
@ -426,7 +426,7 @@ export class TabsBridgedEngine {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
31, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_prepare_for_sync 34, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_prepare_for_sync
FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterTypeTabsBridgedEngine.lower(this),
FfiConverterString.lower(clientData), FfiConverterString.lower(clientData),
) )
@ -443,7 +443,7 @@ export class TabsBridgedEngine {
const liftError = (data) => FfiConverterTypeTabsApiError.lift(data); const liftError = (data) => FfiConverterTypeTabsApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
32, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_reset 35, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_reset
FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterTypeTabsBridgedEngine.lower(this),
) )
} }
@ -459,7 +459,7 @@ export class TabsBridgedEngine {
const liftError = (data) => FfiConverterTypeTabsApiError.lift(data); const liftError = (data) => FfiConverterTypeTabsApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
33, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_reset_sync_id 36, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_reset_sync_id
FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterTypeTabsBridgedEngine.lower(this),
) )
} }
@ -483,7 +483,7 @@ export class TabsBridgedEngine {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
34, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_set_last_sync 37, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_set_last_sync
FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterTypeTabsBridgedEngine.lower(this),
FfiConverterI64.lower(lastSync), FfiConverterI64.lower(lastSync),
) )
@ -516,7 +516,7 @@ export class TabsBridgedEngine {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
35, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_set_uploaded 38, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_set_uploaded
FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterTypeTabsBridgedEngine.lower(this),
FfiConverterI64.lower(newTimestamp), FfiConverterI64.lower(newTimestamp),
FfiConverterSequenceTypeTabsGuid.lower(uploadedIds), FfiConverterSequenceTypeTabsGuid.lower(uploadedIds),
@ -542,7 +542,7 @@ export class TabsBridgedEngine {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
36, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_store_incoming 39, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_store_incoming
FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterTypeTabsBridgedEngine.lower(this),
FfiConverterSequencestring.lower(incomingEnvelopesAsJson), FfiConverterSequencestring.lower(incomingEnvelopesAsJson),
) )
@ -559,7 +559,7 @@ export class TabsBridgedEngine {
const liftError = (data) => FfiConverterTypeTabsApiError.lift(data); const liftError = (data) => FfiConverterTypeTabsApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
37, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_finished 40, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_finished
FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterTypeTabsBridgedEngine.lower(this),
) )
} }
@ -575,7 +575,7 @@ export class TabsBridgedEngine {
const liftError = (data) => FfiConverterTypeTabsApiError.lift(data); const liftError = (data) => FfiConverterTypeTabsApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
38, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_id 41, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_id
FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterTypeTabsBridgedEngine.lower(this),
) )
} }
@ -591,7 +591,7 @@ export class TabsBridgedEngine {
const liftError = (data) => FfiConverterTypeTabsApiError.lift(data); const liftError = (data) => FfiConverterTypeTabsApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
39, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_started 42, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_started
FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterTypeTabsBridgedEngine.lower(this),
) )
} }
@ -607,7 +607,7 @@ export class TabsBridgedEngine {
const liftError = (data) => FfiConverterTypeTabsApiError.lift(data); const liftError = (data) => FfiConverterTypeTabsApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
40, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_wipe 43, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_wipe
FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterTypeTabsBridgedEngine.lower(this),
) )
} }
@ -681,7 +681,7 @@ export class TabsStore {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
42, // tabs:uniffi_tabs_fn_constructor_tabsstore_new 45, // tabs:uniffi_tabs_fn_constructor_tabsstore_new
FfiConverterString.lower(path), FfiConverterString.lower(path),
) )
} }
@ -696,7 +696,7 @@ export class TabsStore {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
43, // tabs:uniffi_tabs_fn_method_tabsstore_bridged_engine 46, // tabs:uniffi_tabs_fn_method_tabsstore_bridged_engine
FfiConverterTypeTabsStore.lower(this), FfiConverterTypeTabsStore.lower(this),
) )
} }
@ -712,7 +712,7 @@ export class TabsStore {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
44, // tabs:uniffi_tabs_fn_method_tabsstore_get_all 47, // tabs:uniffi_tabs_fn_method_tabsstore_get_all
FfiConverterTypeTabsStore.lower(this), FfiConverterTypeTabsStore.lower(this),
) )
} }
@ -728,7 +728,7 @@ export class TabsStore {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
45, // tabs:uniffi_tabs_fn_method_tabsstore_register_with_sync_manager 48, // tabs:uniffi_tabs_fn_method_tabsstore_register_with_sync_manager
FfiConverterTypeTabsStore.lower(this), FfiConverterTypeTabsStore.lower(this),
) )
} }
@ -752,7 +752,7 @@ export class TabsStore {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
46, // tabs:uniffi_tabs_fn_method_tabsstore_set_local_tabs 49, // tabs:uniffi_tabs_fn_method_tabsstore_set_local_tabs
FfiConverterTypeTabsStore.lower(this), FfiConverterTypeTabsStore.lower(this),
FfiConverterSequenceTypeRemoteTabRecord.lower(remoteTabs), FfiConverterSequenceTypeRemoteTabRecord.lower(remoteTabs),
) )

View file

@ -35,7 +35,11 @@ udl_file = "third_party/rust/relevancy/src/relevancy.udl"
[relevancy.receiver_thread] [relevancy.receiver_thread]
default = "worker" default = "worker"
main = [] main = [
"RelevancyStore",
"RelevancyStore.close",
"RelevancyStore.interrupt",
]
[remote_settings] [remote_settings]
crate_name = "remote_settings" crate_name = "remote_settings"

View file

@ -377,7 +377,7 @@ export function add(a,b) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
47, // arithmetic:uniffi_arithmetical_fn_func_add 50, // arithmetic:uniffi_arithmetical_fn_func_add
FfiConverterU64.lower(a), FfiConverterU64.lower(a),
FfiConverterU64.lower(b), FfiConverterU64.lower(b),
) )
@ -411,7 +411,7 @@ export function div(dividend,divisor) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
48, // arithmetic:uniffi_arithmetical_fn_func_div 51, // arithmetic:uniffi_arithmetical_fn_func_div
FfiConverterU64.lower(dividend), FfiConverterU64.lower(dividend),
FfiConverterU64.lower(divisor), FfiConverterU64.lower(divisor),
) )
@ -445,7 +445,7 @@ export function equal(a,b) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
49, // arithmetic:uniffi_arithmetical_fn_func_equal 52, // arithmetic:uniffi_arithmetical_fn_func_equal
FfiConverterU64.lower(a), FfiConverterU64.lower(a),
FfiConverterU64.lower(b), FfiConverterU64.lower(b),
) )
@ -479,7 +479,7 @@ export function sub(a,b) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
50, // arithmetic:uniffi_arithmetical_fn_func_sub 53, // arithmetic:uniffi_arithmetical_fn_func_sub
FfiConverterU64.lower(a), FfiConverterU64.lower(a),
FfiConverterU64.lower(b), FfiConverterU64.lower(b),
) )

View file

@ -455,7 +455,7 @@ export function getCustomTypesDemo(demo) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
51, // custom_types:uniffi_uniffi_custom_types_fn_func_get_custom_types_demo 54, // custom_types:uniffi_uniffi_custom_types_fn_func_get_custom_types_demo
FfiConverterOptionalTypeCustomTypesDemo.lower(demo), FfiConverterOptionalTypeCustomTypesDemo.lower(demo),
) )
} }

View file

@ -381,7 +381,7 @@ export function gradient(value) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
52, // external_types:uniffi_uniffi_fixture_external_types_fn_func_gradient 55, // external_types:uniffi_uniffi_fixture_external_types_fn_func_gradient
FfiConverterOptionalTypeLine.lower(value), FfiConverterOptionalTypeLine.lower(value),
) )
} }
@ -414,7 +414,7 @@ export function intersection(ln1,ln2) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
53, // external_types:uniffi_uniffi_fixture_external_types_fn_func_intersection 56, // external_types:uniffi_uniffi_fixture_external_types_fn_func_intersection
FfiConverterTypeLine.lower(ln1), FfiConverterTypeLine.lower(ln1),
FfiConverterTypeLine.lower(ln2), FfiConverterTypeLine.lower(ln2),
) )

View file

@ -474,7 +474,7 @@ export function gradient(ln) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
58, // geometry:uniffi_uniffi_geometry_fn_func_gradient 61, // geometry:uniffi_uniffi_geometry_fn_func_gradient
FfiConverterTypeLine.lower(ln), FfiConverterTypeLine.lower(ln),
) )
} }
@ -507,7 +507,7 @@ export function intersection(ln1,ln2) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
59, // geometry:uniffi_uniffi_geometry_fn_func_intersection 62, // geometry:uniffi_uniffi_geometry_fn_func_intersection
FfiConverterTypeLine.lower(ln1), FfiConverterTypeLine.lower(ln1),
FfiConverterTypeLine.lower(ln2), FfiConverterTypeLine.lower(ln2),
) )

View file

@ -321,7 +321,7 @@ export class SingletonObject {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
55, // refcounts:uniffi_uniffi_fixture_refcounts_fn_method_singletonobject_method 58, // refcounts:uniffi_uniffi_fixture_refcounts_fn_method_singletonobject_method
FfiConverterTypeSingletonObject.lower(this), FfiConverterTypeSingletonObject.lower(this),
) )
} }
@ -369,7 +369,7 @@ export function getJsRefcount() {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
56, // refcounts:uniffi_uniffi_fixture_refcounts_fn_func_get_js_refcount 59, // refcounts:uniffi_uniffi_fixture_refcounts_fn_func_get_js_refcount
) )
} }
return handleRustResult(functionCall(), liftResult, liftError); return handleRustResult(functionCall(), liftResult, liftError);
@ -381,7 +381,7 @@ export function getSingleton() {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
57, // refcounts:uniffi_uniffi_fixture_refcounts_fn_func_get_singleton 60, // refcounts:uniffi_uniffi_fixture_refcounts_fn_func_get_singleton
) )
} }
return handleRustResult(functionCall(), liftResult, liftError); return handleRustResult(functionCall(), liftResult, liftError);

View file

@ -620,7 +620,7 @@ export class Optionneur {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
61, // rondpoint:uniffi_uniffi_rondpoint_fn_constructor_optionneur_new 64, // rondpoint:uniffi_uniffi_rondpoint_fn_constructor_optionneur_new
) )
} }
try { try {
@ -642,7 +642,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
62, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_boolean 65, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_boolean
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterBool.lower(value), FfiConverterBool.lower(value),
) )
@ -667,7 +667,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
63, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_enum 66, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_enum
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterTypeEnumeration.lower(value), FfiConverterTypeEnumeration.lower(value),
) )
@ -692,7 +692,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
64, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_f32 67, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_f32
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterF32.lower(value), FfiConverterF32.lower(value),
) )
@ -717,7 +717,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
65, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_f64 68, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_f64
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterF64.lower(value), FfiConverterF64.lower(value),
) )
@ -742,7 +742,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
66, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i16_dec 69, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i16_dec
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterI16.lower(value), FfiConverterI16.lower(value),
) )
@ -767,7 +767,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
67, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i16_hex 70, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i16_hex
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterI16.lower(value), FfiConverterI16.lower(value),
) )
@ -792,7 +792,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
68, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i32_dec 71, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i32_dec
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterI32.lower(value), FfiConverterI32.lower(value),
) )
@ -817,7 +817,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
69, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i32_hex 72, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i32_hex
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterI32.lower(value), FfiConverterI32.lower(value),
) )
@ -842,7 +842,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
70, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i64_dec 73, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i64_dec
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterI64.lower(value), FfiConverterI64.lower(value),
) )
@ -867,7 +867,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
71, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i64_hex 74, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i64_hex
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterI64.lower(value), FfiConverterI64.lower(value),
) )
@ -892,7 +892,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
72, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i8_dec 75, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i8_dec
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterI8.lower(value), FfiConverterI8.lower(value),
) )
@ -917,7 +917,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
73, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i8_hex 76, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i8_hex
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterI8.lower(value), FfiConverterI8.lower(value),
) )
@ -942,7 +942,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
74, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_null 77, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_null
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterOptionalstring.lower(value), FfiConverterOptionalstring.lower(value),
) )
@ -967,7 +967,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
75, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_sequence 78, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_sequence
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterSequencestring.lower(value), FfiConverterSequencestring.lower(value),
) )
@ -992,7 +992,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
76, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_string 79, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_string
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterString.lower(value), FfiConverterString.lower(value),
) )
@ -1017,7 +1017,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
77, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u16_dec 80, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u16_dec
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterU16.lower(value), FfiConverterU16.lower(value),
) )
@ -1042,7 +1042,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
78, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u16_hex 81, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u16_hex
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterU16.lower(value), FfiConverterU16.lower(value),
) )
@ -1067,7 +1067,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
79, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u32_dec 82, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u32_dec
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterU32.lower(value), FfiConverterU32.lower(value),
) )
@ -1092,7 +1092,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
80, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u32_hex 83, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u32_hex
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterU32.lower(value), FfiConverterU32.lower(value),
) )
@ -1117,7 +1117,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
81, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u32_oct 84, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u32_oct
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterU32.lower(value), FfiConverterU32.lower(value),
) )
@ -1142,7 +1142,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
82, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u64_dec 85, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u64_dec
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterU64.lower(value), FfiConverterU64.lower(value),
) )
@ -1167,7 +1167,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
83, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u64_hex 86, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u64_hex
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterU64.lower(value), FfiConverterU64.lower(value),
) )
@ -1192,7 +1192,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
84, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u8_dec 87, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u8_dec
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterU8.lower(value), FfiConverterU8.lower(value),
) )
@ -1217,7 +1217,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
85, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u8_hex 88, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u8_hex
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterU8.lower(value), FfiConverterU8.lower(value),
) )
@ -1242,7 +1242,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
86, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_zero 89, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_zero
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterOptionali32.lower(value), FfiConverterOptionali32.lower(value),
) )
@ -1309,7 +1309,7 @@ export class Retourneur {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
88, // rondpoint:uniffi_uniffi_rondpoint_fn_constructor_retourneur_new 91, // rondpoint:uniffi_uniffi_rondpoint_fn_constructor_retourneur_new
) )
} }
try { try {
@ -1331,7 +1331,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
89, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_boolean 92, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_boolean
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterBool.lower(value), FfiConverterBool.lower(value),
) )
@ -1356,7 +1356,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
90, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_double 93, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_double
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterF64.lower(value), FfiConverterF64.lower(value),
) )
@ -1381,7 +1381,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
91, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_float 94, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_float
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterF32.lower(value), FfiConverterF32.lower(value),
) )
@ -1406,7 +1406,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
92, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i16 95, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i16
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterI16.lower(value), FfiConverterI16.lower(value),
) )
@ -1431,7 +1431,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
93, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i32 96, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i32
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterI32.lower(value), FfiConverterI32.lower(value),
) )
@ -1456,7 +1456,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
94, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i64 97, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i64
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterI64.lower(value), FfiConverterI64.lower(value),
) )
@ -1481,7 +1481,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
95, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i8 98, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i8
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterI8.lower(value), FfiConverterI8.lower(value),
) )
@ -1506,7 +1506,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
96, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_nombres 99, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_nombres
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterTypeDictionnaireNombres.lower(value), FfiConverterTypeDictionnaireNombres.lower(value),
) )
@ -1531,7 +1531,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
97, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_nombres_signes 100, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_nombres_signes
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterTypeDictionnaireNombresSignes.lower(value), FfiConverterTypeDictionnaireNombresSignes.lower(value),
) )
@ -1556,7 +1556,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
98, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_optionneur_dictionnaire 101, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_optionneur_dictionnaire
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterTypeOptionneurDictionnaire.lower(value), FfiConverterTypeOptionneurDictionnaire.lower(value),
) )
@ -1581,7 +1581,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
99, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_string 102, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_string
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterString.lower(value), FfiConverterString.lower(value),
) )
@ -1606,7 +1606,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
100, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u16 103, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u16
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterU16.lower(value), FfiConverterU16.lower(value),
) )
@ -1631,7 +1631,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
101, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u32 104, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u32
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterU32.lower(value), FfiConverterU32.lower(value),
) )
@ -1656,7 +1656,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
102, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u64 105, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u64
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterU64.lower(value), FfiConverterU64.lower(value),
) )
@ -1681,7 +1681,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
103, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u8 106, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u8
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterU8.lower(value), FfiConverterU8.lower(value),
) )
@ -1748,7 +1748,7 @@ export class Stringifier {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
105, // rondpoint:uniffi_uniffi_rondpoint_fn_constructor_stringifier_new 108, // rondpoint:uniffi_uniffi_rondpoint_fn_constructor_stringifier_new
) )
} }
try { try {
@ -1770,7 +1770,7 @@ export class Stringifier {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
106, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_boolean 109, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_boolean
FfiConverterTypeStringifier.lower(this), FfiConverterTypeStringifier.lower(this),
FfiConverterBool.lower(value), FfiConverterBool.lower(value),
) )
@ -1795,7 +1795,7 @@ export class Stringifier {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
107, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_double 110, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_double
FfiConverterTypeStringifier.lower(this), FfiConverterTypeStringifier.lower(this),
FfiConverterF64.lower(value), FfiConverterF64.lower(value),
) )
@ -1820,7 +1820,7 @@ export class Stringifier {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
108, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_float 111, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_float
FfiConverterTypeStringifier.lower(this), FfiConverterTypeStringifier.lower(this),
FfiConverterF32.lower(value), FfiConverterF32.lower(value),
) )
@ -1845,7 +1845,7 @@ export class Stringifier {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
109, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i16 112, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i16
FfiConverterTypeStringifier.lower(this), FfiConverterTypeStringifier.lower(this),
FfiConverterI16.lower(value), FfiConverterI16.lower(value),
) )
@ -1870,7 +1870,7 @@ export class Stringifier {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
110, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i32 113, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i32
FfiConverterTypeStringifier.lower(this), FfiConverterTypeStringifier.lower(this),
FfiConverterI32.lower(value), FfiConverterI32.lower(value),
) )
@ -1895,7 +1895,7 @@ export class Stringifier {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
111, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i64 114, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i64
FfiConverterTypeStringifier.lower(this), FfiConverterTypeStringifier.lower(this),
FfiConverterI64.lower(value), FfiConverterI64.lower(value),
) )
@ -1920,7 +1920,7 @@ export class Stringifier {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
112, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i8 115, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i8
FfiConverterTypeStringifier.lower(this), FfiConverterTypeStringifier.lower(this),
FfiConverterI8.lower(value), FfiConverterI8.lower(value),
) )
@ -1945,7 +1945,7 @@ export class Stringifier {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
113, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u16 116, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u16
FfiConverterTypeStringifier.lower(this), FfiConverterTypeStringifier.lower(this),
FfiConverterU16.lower(value), FfiConverterU16.lower(value),
) )
@ -1970,7 +1970,7 @@ export class Stringifier {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
114, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u32 117, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u32
FfiConverterTypeStringifier.lower(this), FfiConverterTypeStringifier.lower(this),
FfiConverterU32.lower(value), FfiConverterU32.lower(value),
) )
@ -1995,7 +1995,7 @@ export class Stringifier {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
115, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u64 118, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u64
FfiConverterTypeStringifier.lower(this), FfiConverterTypeStringifier.lower(this),
FfiConverterU64.lower(value), FfiConverterU64.lower(value),
) )
@ -2020,7 +2020,7 @@ export class Stringifier {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
116, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u8 119, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u8
FfiConverterTypeStringifier.lower(this), FfiConverterTypeStringifier.lower(this),
FfiConverterU8.lower(value), FfiConverterU8.lower(value),
) )
@ -2045,7 +2045,7 @@ export class Stringifier {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
117, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_well_known_string 120, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_well_known_string
FfiConverterTypeStringifier.lower(this), FfiConverterTypeStringifier.lower(this),
FfiConverterString.lower(value), FfiConverterString.lower(value),
) )
@ -3284,7 +3284,7 @@ export function copieCarte(c) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
118, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_carte 121, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_carte
FfiConverterMapStringTypeEnumerationAvecDonnees.lower(c), FfiConverterMapStringTypeEnumerationAvecDonnees.lower(c),
) )
} }
@ -3309,7 +3309,7 @@ export function copieDictionnaire(d) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
119, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_dictionnaire 122, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_dictionnaire
FfiConverterTypeDictionnaire.lower(d), FfiConverterTypeDictionnaire.lower(d),
) )
} }
@ -3334,7 +3334,7 @@ export function copieEnumeration(e) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
120, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_enumeration 123, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_enumeration
FfiConverterTypeEnumeration.lower(e), FfiConverterTypeEnumeration.lower(e),
) )
} }
@ -3359,7 +3359,7 @@ export function copieEnumerations(e) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
121, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_enumerations 124, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_enumerations
FfiConverterSequenceTypeEnumeration.lower(e), FfiConverterSequenceTypeEnumeration.lower(e),
) )
} }
@ -3384,7 +3384,7 @@ export function switcheroo(b) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
122, // rondpoint:uniffi_uniffi_rondpoint_fn_func_switcheroo 125, // rondpoint:uniffi_uniffi_rondpoint_fn_func_switcheroo
FfiConverterBool.lower(b), FfiConverterBool.lower(b),
) )
} }

View file

@ -325,7 +325,7 @@ export class Sprite {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
124, // sprites:uniffi_uniffi_sprites_fn_constructor_sprite_new 127, // sprites:uniffi_uniffi_sprites_fn_constructor_sprite_new
FfiConverterOptionalTypePoint.lower(initialPosition), FfiConverterOptionalTypePoint.lower(initialPosition),
) )
} }
@ -361,7 +361,7 @@ export class Sprite {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
125, // sprites:uniffi_uniffi_sprites_fn_constructor_sprite_new_relative_to 128, // sprites:uniffi_uniffi_sprites_fn_constructor_sprite_new_relative_to
FfiConverterTypePoint.lower(reference), FfiConverterTypePoint.lower(reference),
FfiConverterTypeVector.lower(direction), FfiConverterTypeVector.lower(direction),
) )
@ -377,7 +377,7 @@ export class Sprite {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
126, // sprites:uniffi_uniffi_sprites_fn_method_sprite_get_position 129, // sprites:uniffi_uniffi_sprites_fn_method_sprite_get_position
FfiConverterTypeSprite.lower(this), FfiConverterTypeSprite.lower(this),
) )
} }
@ -401,7 +401,7 @@ export class Sprite {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
127, // sprites:uniffi_uniffi_sprites_fn_method_sprite_move_by 130, // sprites:uniffi_uniffi_sprites_fn_method_sprite_move_by
FfiConverterTypeSprite.lower(this), FfiConverterTypeSprite.lower(this),
FfiConverterTypeVector.lower(direction), FfiConverterTypeVector.lower(direction),
) )
@ -426,7 +426,7 @@ export class Sprite {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
128, // sprites:uniffi_uniffi_sprites_fn_method_sprite_move_to 131, // sprites:uniffi_uniffi_sprites_fn_method_sprite_move_to
FfiConverterTypeSprite.lower(this), FfiConverterTypeSprite.lower(this),
FfiConverterTypePoint.lower(position), FfiConverterTypePoint.lower(position),
) )
@ -678,7 +678,7 @@ export function translate(position,direction) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
129, // sprites:uniffi_uniffi_sprites_fn_func_translate 132, // sprites:uniffi_uniffi_sprites_fn_func_translate
FfiConverterTypePoint.lower(position), FfiConverterTypePoint.lower(position),
FfiConverterTypeVector.lower(direction), FfiConverterTypeVector.lower(direction),
) )

View file

@ -298,7 +298,7 @@ export class TodoList {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
131, // todolist:uniffi_uniffi_todolist_fn_constructor_todolist_new 134, // todolist:uniffi_uniffi_todolist_fn_constructor_todolist_new
) )
} }
try { try {
@ -320,7 +320,7 @@ export class TodoList {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
132, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_entries 135, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_entries
FfiConverterTypeTodoList.lower(this), FfiConverterTypeTodoList.lower(this),
FfiConverterSequenceTypeTodoEntry.lower(entries), FfiConverterSequenceTypeTodoEntry.lower(entries),
) )
@ -345,7 +345,7 @@ export class TodoList {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
133, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_entry 136, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_entry
FfiConverterTypeTodoList.lower(this), FfiConverterTypeTodoList.lower(this),
FfiConverterTypeTodoEntry.lower(entry), FfiConverterTypeTodoEntry.lower(entry),
) )
@ -370,7 +370,7 @@ export class TodoList {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
134, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_item 137, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_item
FfiConverterTypeTodoList.lower(this), FfiConverterTypeTodoList.lower(this),
FfiConverterString.lower(todo), FfiConverterString.lower(todo),
) )
@ -395,7 +395,7 @@ export class TodoList {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
135, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_items 138, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_items
FfiConverterTypeTodoList.lower(this), FfiConverterTypeTodoList.lower(this),
FfiConverterSequencestring.lower(items), FfiConverterSequencestring.lower(items),
) )
@ -420,7 +420,7 @@ export class TodoList {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
136, // todolist:uniffi_uniffi_todolist_fn_method_todolist_clear_item 139, // todolist:uniffi_uniffi_todolist_fn_method_todolist_clear_item
FfiConverterTypeTodoList.lower(this), FfiConverterTypeTodoList.lower(this),
FfiConverterString.lower(todo), FfiConverterString.lower(todo),
) )
@ -437,7 +437,7 @@ export class TodoList {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
137, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_entries 140, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_entries
FfiConverterTypeTodoList.lower(this), FfiConverterTypeTodoList.lower(this),
) )
} }
@ -453,7 +453,7 @@ export class TodoList {
const liftError = (data) => FfiConverterTypeTodoError.lift(data); const liftError = (data) => FfiConverterTypeTodoError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
138, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_first 141, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_first
FfiConverterTypeTodoList.lower(this), FfiConverterTypeTodoList.lower(this),
) )
} }
@ -469,7 +469,7 @@ export class TodoList {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
139, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_items 142, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_items
FfiConverterTypeTodoList.lower(this), FfiConverterTypeTodoList.lower(this),
) )
} }
@ -485,7 +485,7 @@ export class TodoList {
const liftError = (data) => FfiConverterTypeTodoError.lift(data); const liftError = (data) => FfiConverterTypeTodoError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
140, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_last 143, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_last
FfiConverterTypeTodoList.lower(this), FfiConverterTypeTodoList.lower(this),
) )
} }
@ -501,7 +501,7 @@ export class TodoList {
const liftError = (data) => FfiConverterTypeTodoError.lift(data); const liftError = (data) => FfiConverterTypeTodoError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
141, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_last_entry 144, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_last_entry
FfiConverterTypeTodoList.lower(this), FfiConverterTypeTodoList.lower(this),
) )
} }
@ -517,7 +517,7 @@ export class TodoList {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
142, // todolist:uniffi_uniffi_todolist_fn_method_todolist_make_default 145, // todolist:uniffi_uniffi_todolist_fn_method_todolist_make_default
FfiConverterTypeTodoList.lower(this), FfiConverterTypeTodoList.lower(this),
) )
} }
@ -880,7 +880,7 @@ export function createEntryWith(todo) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
143, // todolist:uniffi_uniffi_todolist_fn_func_create_entry_with 146, // todolist:uniffi_uniffi_todolist_fn_func_create_entry_with
FfiConverterString.lower(todo), FfiConverterString.lower(todo),
) )
} }
@ -897,7 +897,7 @@ export function getDefaultList() {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
144, // todolist:uniffi_uniffi_todolist_fn_func_get_default_list 147, // todolist:uniffi_uniffi_todolist_fn_func_get_default_list
) )
} }
try { try {
@ -921,7 +921,7 @@ export function setDefaultList(list) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
145, // todolist:uniffi_uniffi_todolist_fn_func_set_default_list 148, // todolist:uniffi_uniffi_todolist_fn_func_set_default_list
FfiConverterTypeTodoList.lower(list), FfiConverterTypeTodoList.lower(list),
) )
} }

File diff suppressed because it is too large Load diff

View file

@ -28,7 +28,9 @@ extern "C" {
void uniffi_relevancy_fn_free_relevancystore(void *, RustCallStatus*); void uniffi_relevancy_fn_free_relevancystore(void *, RustCallStatus*);
void * uniffi_relevancy_fn_constructor_relevancystore_new(RustBuffer, RustCallStatus*); void * uniffi_relevancy_fn_constructor_relevancystore_new(RustBuffer, RustCallStatus*);
RustBuffer uniffi_relevancy_fn_method_relevancystore_calculate_metrics(void *, RustCallStatus*); RustBuffer uniffi_relevancy_fn_method_relevancystore_calculate_metrics(void *, RustCallStatus*);
void uniffi_relevancy_fn_method_relevancystore_close(void *, RustCallStatus*);
void uniffi_relevancy_fn_method_relevancystore_ingest(void *, RustBuffer, RustCallStatus*); void uniffi_relevancy_fn_method_relevancystore_ingest(void *, RustBuffer, RustCallStatus*);
void uniffi_relevancy_fn_method_relevancystore_interrupt(void *, RustCallStatus*);
RustBuffer uniffi_relevancy_fn_method_relevancystore_user_interest_vector(void *, RustCallStatus*); RustBuffer uniffi_relevancy_fn_method_relevancystore_user_interest_vector(void *, RustCallStatus*);
void * uniffi_remote_settings_fn_clone_remotesettings(void *, RustCallStatus*); void * uniffi_remote_settings_fn_clone_remotesettings(void *, RustCallStatus*);
void uniffi_remote_settings_fn_free_remotesettings(void *, RustCallStatus*); void uniffi_remote_settings_fn_free_remotesettings(void *, RustCallStatus*);
@ -54,6 +56,7 @@ extern "C" {
void * uniffi_suggest_fn_method_suggeststorebuilder_cache_path(void *, RustBuffer, RustCallStatus*); void * uniffi_suggest_fn_method_suggeststorebuilder_cache_path(void *, RustBuffer, RustCallStatus*);
void * uniffi_suggest_fn_method_suggeststorebuilder_data_path(void *, RustBuffer, RustCallStatus*); void * uniffi_suggest_fn_method_suggeststorebuilder_data_path(void *, RustBuffer, RustCallStatus*);
void * uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_config(void *, RustBuffer, RustCallStatus*); void * uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_config(void *, RustBuffer, RustCallStatus*);
void * uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_server(void *, RustBuffer, RustCallStatus*);
int8_t uniffi_suggest_fn_func_raw_suggestion_url_matches(RustBuffer, RustBuffer, RustCallStatus*); int8_t uniffi_suggest_fn_func_raw_suggestion_url_matches(RustBuffer, RustBuffer, RustCallStatus*);
void * uniffi_tabs_fn_clone_tabsbridgedengine(void *, RustCallStatus*); void * uniffi_tabs_fn_clone_tabsbridgedengine(void *, RustCallStatus*);
void uniffi_tabs_fn_free_tabsbridgedengine(void *, RustCallStatus*); void uniffi_tabs_fn_free_tabsbridgedengine(void *, RustCallStatus*);
@ -136,179 +139,191 @@ Maybe<already_AddRefed<Promise>> UniFFICallAsync(const GlobalObject& aGlobal, ui
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kRelevancyRelevancyStorePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kRelevancyRelevancyStorePointerType>>;
return Some(CallHandler::CallAsync(uniffi_relevancy_fn_method_relevancystore_calculate_metrics, aGlobal, aArgs, "uniffi_relevancy_fn_method_relevancystore_calculate_metrics: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_relevancy_fn_method_relevancystore_calculate_metrics, aGlobal, aArgs, "uniffi_relevancy_fn_method_relevancystore_calculate_metrics: "_ns, aError));
} }
case 3: { // relevancy:uniffi_relevancy_fn_method_relevancystore_ingest case 3: { // relevancy:uniffi_relevancy_fn_method_relevancystore_close
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kRelevancyRelevancyStorePointerType>>;
return Some(CallHandler::CallAsync(uniffi_relevancy_fn_method_relevancystore_close, aGlobal, aArgs, "uniffi_relevancy_fn_method_relevancystore_close: "_ns, aError));
}
case 4: { // relevancy:uniffi_relevancy_fn_method_relevancystore_ingest
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kRelevancyRelevancyStorePointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kRelevancyRelevancyStorePointerType>, ScaffoldingConverter<RustBuffer>>;
return Some(CallHandler::CallAsync(uniffi_relevancy_fn_method_relevancystore_ingest, aGlobal, aArgs, "uniffi_relevancy_fn_method_relevancystore_ingest: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_relevancy_fn_method_relevancystore_ingest, aGlobal, aArgs, "uniffi_relevancy_fn_method_relevancystore_ingest: "_ns, aError));
} }
case 4: { // relevancy:uniffi_relevancy_fn_method_relevancystore_user_interest_vector case 5: { // relevancy:uniffi_relevancy_fn_method_relevancystore_interrupt
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kRelevancyRelevancyStorePointerType>>;
return Some(CallHandler::CallAsync(uniffi_relevancy_fn_method_relevancystore_interrupt, aGlobal, aArgs, "uniffi_relevancy_fn_method_relevancystore_interrupt: "_ns, aError));
}
case 6: { // relevancy:uniffi_relevancy_fn_method_relevancystore_user_interest_vector
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kRelevancyRelevancyStorePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kRelevancyRelevancyStorePointerType>>;
return Some(CallHandler::CallAsync(uniffi_relevancy_fn_method_relevancystore_user_interest_vector, aGlobal, aArgs, "uniffi_relevancy_fn_method_relevancystore_user_interest_vector: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_relevancy_fn_method_relevancystore_user_interest_vector, aGlobal, aArgs, "uniffi_relevancy_fn_method_relevancystore_user_interest_vector: "_ns, aError));
} }
case 5: { // remote_settings:uniffi_remote_settings_fn_clone_remotesettings case 7: { // remote_settings:uniffi_remote_settings_fn_clone_remotesettings
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsPointerType>, ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsPointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsPointerType>, ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsPointerType>>;
return Some(CallHandler::CallAsync(uniffi_remote_settings_fn_clone_remotesettings, aGlobal, aArgs, "uniffi_remote_settings_fn_clone_remotesettings: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_remote_settings_fn_clone_remotesettings, aGlobal, aArgs, "uniffi_remote_settings_fn_clone_remotesettings: "_ns, aError));
} }
case 6: { // remote_settings:uniffi_remote_settings_fn_constructor_remotesettings_new case 8: { // remote_settings:uniffi_remote_settings_fn_constructor_remotesettings_new
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsPointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsPointerType>, ScaffoldingConverter<RustBuffer>>;
return Some(CallHandler::CallAsync(uniffi_remote_settings_fn_constructor_remotesettings_new, aGlobal, aArgs, "uniffi_remote_settings_fn_constructor_remotesettings_new: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_remote_settings_fn_constructor_remotesettings_new, aGlobal, aArgs, "uniffi_remote_settings_fn_constructor_remotesettings_new: "_ns, aError));
} }
case 7: { // remote_settings:uniffi_remote_settings_fn_method_remotesettings_download_attachment_to_path case 9: { // remote_settings:uniffi_remote_settings_fn_method_remotesettings_download_attachment_to_path
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsPointerType>, ScaffoldingConverter<RustBuffer>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsPointerType>, ScaffoldingConverter<RustBuffer>, ScaffoldingConverter<RustBuffer>>;
return Some(CallHandler::CallAsync(uniffi_remote_settings_fn_method_remotesettings_download_attachment_to_path, aGlobal, aArgs, "uniffi_remote_settings_fn_method_remotesettings_download_attachment_to_path: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_remote_settings_fn_method_remotesettings_download_attachment_to_path, aGlobal, aArgs, "uniffi_remote_settings_fn_method_remotesettings_download_attachment_to_path: "_ns, aError));
} }
case 8: { // remote_settings:uniffi_remote_settings_fn_method_remotesettings_get_records case 10: { // remote_settings:uniffi_remote_settings_fn_method_remotesettings_get_records
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsPointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsPointerType>>;
return Some(CallHandler::CallAsync(uniffi_remote_settings_fn_method_remotesettings_get_records, aGlobal, aArgs, "uniffi_remote_settings_fn_method_remotesettings_get_records: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_remote_settings_fn_method_remotesettings_get_records, aGlobal, aArgs, "uniffi_remote_settings_fn_method_remotesettings_get_records: "_ns, aError));
} }
case 9: { // remote_settings:uniffi_remote_settings_fn_method_remotesettings_get_records_since case 11: { // remote_settings:uniffi_remote_settings_fn_method_remotesettings_get_records_since
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsPointerType>, ScaffoldingConverter<uint64_t>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsPointerType>, ScaffoldingConverter<uint64_t>>;
return Some(CallHandler::CallAsync(uniffi_remote_settings_fn_method_remotesettings_get_records_since, aGlobal, aArgs, "uniffi_remote_settings_fn_method_remotesettings_get_records_since: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_remote_settings_fn_method_remotesettings_get_records_since, aGlobal, aArgs, "uniffi_remote_settings_fn_method_remotesettings_get_records_since: "_ns, aError));
} }
case 10: { // suggest:uniffi_suggest_fn_clone_suggeststore case 12: { // suggest:uniffi_suggest_fn_clone_suggeststore
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>>;
return Some(CallHandler::CallAsync(uniffi_suggest_fn_clone_suggeststore, aGlobal, aArgs, "uniffi_suggest_fn_clone_suggeststore: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_suggest_fn_clone_suggeststore, aGlobal, aArgs, "uniffi_suggest_fn_clone_suggeststore: "_ns, aError));
} }
case 11: { // suggest:uniffi_suggest_fn_constructor_suggeststore_new case 13: { // suggest:uniffi_suggest_fn_constructor_suggeststore_new
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingConverter<RustBuffer>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingConverter<RustBuffer>, ScaffoldingConverter<RustBuffer>>;
return Some(CallHandler::CallAsync(uniffi_suggest_fn_constructor_suggeststore_new, aGlobal, aArgs, "uniffi_suggest_fn_constructor_suggeststore_new: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_suggest_fn_constructor_suggeststore_new, aGlobal, aArgs, "uniffi_suggest_fn_constructor_suggeststore_new: "_ns, aError));
} }
case 12: { // suggest:uniffi_suggest_fn_method_suggeststore_clear case 14: { // suggest:uniffi_suggest_fn_method_suggeststore_clear
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>>;
return Some(CallHandler::CallAsync(uniffi_suggest_fn_method_suggeststore_clear, aGlobal, aArgs, "uniffi_suggest_fn_method_suggeststore_clear: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_suggest_fn_method_suggeststore_clear, aGlobal, aArgs, "uniffi_suggest_fn_method_suggeststore_clear: "_ns, aError));
} }
case 13: { // suggest:uniffi_suggest_fn_method_suggeststore_clear_dismissed_suggestions case 15: { // suggest:uniffi_suggest_fn_method_suggeststore_clear_dismissed_suggestions
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>>;
return Some(CallHandler::CallAsync(uniffi_suggest_fn_method_suggeststore_clear_dismissed_suggestions, aGlobal, aArgs, "uniffi_suggest_fn_method_suggeststore_clear_dismissed_suggestions: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_suggest_fn_method_suggeststore_clear_dismissed_suggestions, aGlobal, aArgs, "uniffi_suggest_fn_method_suggeststore_clear_dismissed_suggestions: "_ns, aError));
} }
case 14: { // suggest:uniffi_suggest_fn_method_suggeststore_dismiss_suggestion case 16: { // suggest:uniffi_suggest_fn_method_suggeststore_dismiss_suggestion
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingConverter<RustBuffer>>;
return Some(CallHandler::CallAsync(uniffi_suggest_fn_method_suggeststore_dismiss_suggestion, aGlobal, aArgs, "uniffi_suggest_fn_method_suggeststore_dismiss_suggestion: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_suggest_fn_method_suggeststore_dismiss_suggestion, aGlobal, aArgs, "uniffi_suggest_fn_method_suggeststore_dismiss_suggestion: "_ns, aError));
} }
case 15: { // suggest:uniffi_suggest_fn_method_suggeststore_fetch_global_config case 17: { // suggest:uniffi_suggest_fn_method_suggeststore_fetch_global_config
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>>;
return Some(CallHandler::CallAsync(uniffi_suggest_fn_method_suggeststore_fetch_global_config, aGlobal, aArgs, "uniffi_suggest_fn_method_suggeststore_fetch_global_config: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_suggest_fn_method_suggeststore_fetch_global_config, aGlobal, aArgs, "uniffi_suggest_fn_method_suggeststore_fetch_global_config: "_ns, aError));
} }
case 16: { // suggest:uniffi_suggest_fn_method_suggeststore_fetch_provider_config case 18: { // suggest:uniffi_suggest_fn_method_suggeststore_fetch_provider_config
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingConverter<RustBuffer>>;
return Some(CallHandler::CallAsync(uniffi_suggest_fn_method_suggeststore_fetch_provider_config, aGlobal, aArgs, "uniffi_suggest_fn_method_suggeststore_fetch_provider_config: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_suggest_fn_method_suggeststore_fetch_provider_config, aGlobal, aArgs, "uniffi_suggest_fn_method_suggeststore_fetch_provider_config: "_ns, aError));
} }
case 17: { // suggest:uniffi_suggest_fn_method_suggeststore_ingest case 19: { // suggest:uniffi_suggest_fn_method_suggeststore_ingest
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingConverter<RustBuffer>>;
return Some(CallHandler::CallAsync(uniffi_suggest_fn_method_suggeststore_ingest, aGlobal, aArgs, "uniffi_suggest_fn_method_suggeststore_ingest: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_suggest_fn_method_suggeststore_ingest, aGlobal, aArgs, "uniffi_suggest_fn_method_suggeststore_ingest: "_ns, aError));
} }
case 18: { // suggest:uniffi_suggest_fn_method_suggeststore_interrupt case 20: { // suggest:uniffi_suggest_fn_method_suggeststore_interrupt
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>>;
return Some(CallHandler::CallAsync(uniffi_suggest_fn_method_suggeststore_interrupt, aGlobal, aArgs, "uniffi_suggest_fn_method_suggeststore_interrupt: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_suggest_fn_method_suggeststore_interrupt, aGlobal, aArgs, "uniffi_suggest_fn_method_suggeststore_interrupt: "_ns, aError));
} }
case 19: { // suggest:uniffi_suggest_fn_method_suggeststore_query case 21: { // suggest:uniffi_suggest_fn_method_suggeststore_query
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingConverter<RustBuffer>>;
return Some(CallHandler::CallAsync(uniffi_suggest_fn_method_suggeststore_query, aGlobal, aArgs, "uniffi_suggest_fn_method_suggeststore_query: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_suggest_fn_method_suggeststore_query, aGlobal, aArgs, "uniffi_suggest_fn_method_suggeststore_query: "_ns, aError));
} }
case 20: { // suggest:uniffi_suggest_fn_clone_suggeststorebuilder case 22: { // suggest:uniffi_suggest_fn_clone_suggeststorebuilder
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>>;
return Some(CallHandler::CallAsync(uniffi_suggest_fn_clone_suggeststorebuilder, aGlobal, aArgs, "uniffi_suggest_fn_clone_suggeststorebuilder: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_suggest_fn_clone_suggeststorebuilder, aGlobal, aArgs, "uniffi_suggest_fn_clone_suggeststorebuilder: "_ns, aError));
} }
case 21: { // suggest:uniffi_suggest_fn_constructor_suggeststorebuilder_new case 23: { // suggest:uniffi_suggest_fn_constructor_suggeststorebuilder_new
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>>;
return Some(CallHandler::CallAsync(uniffi_suggest_fn_constructor_suggeststorebuilder_new, aGlobal, aArgs, "uniffi_suggest_fn_constructor_suggeststorebuilder_new: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_suggest_fn_constructor_suggeststorebuilder_new, aGlobal, aArgs, "uniffi_suggest_fn_constructor_suggeststorebuilder_new: "_ns, aError));
} }
case 22: { // suggest:uniffi_suggest_fn_method_suggeststorebuilder_build case 24: { // suggest:uniffi_suggest_fn_method_suggeststorebuilder_build
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>>;
return Some(CallHandler::CallAsync(uniffi_suggest_fn_method_suggeststorebuilder_build, aGlobal, aArgs, "uniffi_suggest_fn_method_suggeststorebuilder_build: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_suggest_fn_method_suggeststorebuilder_build, aGlobal, aArgs, "uniffi_suggest_fn_method_suggeststorebuilder_build: "_ns, aError));
} }
case 23: { // suggest:uniffi_suggest_fn_method_suggeststorebuilder_cache_path case 25: { // suggest:uniffi_suggest_fn_method_suggeststorebuilder_cache_path
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingConverter<RustBuffer>>;
return Some(CallHandler::CallAsync(uniffi_suggest_fn_method_suggeststorebuilder_cache_path, aGlobal, aArgs, "uniffi_suggest_fn_method_suggeststorebuilder_cache_path: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_suggest_fn_method_suggeststorebuilder_cache_path, aGlobal, aArgs, "uniffi_suggest_fn_method_suggeststorebuilder_cache_path: "_ns, aError));
} }
case 24: { // suggest:uniffi_suggest_fn_method_suggeststorebuilder_data_path case 26: { // suggest:uniffi_suggest_fn_method_suggeststorebuilder_data_path
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingConverter<RustBuffer>>;
return Some(CallHandler::CallAsync(uniffi_suggest_fn_method_suggeststorebuilder_data_path, aGlobal, aArgs, "uniffi_suggest_fn_method_suggeststorebuilder_data_path: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_suggest_fn_method_suggeststorebuilder_data_path, aGlobal, aArgs, "uniffi_suggest_fn_method_suggeststorebuilder_data_path: "_ns, aError));
} }
case 25: { // suggest:uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_config case 27: { // suggest:uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_config
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingConverter<RustBuffer>>;
return Some(CallHandler::CallAsync(uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_config, aGlobal, aArgs, "uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_config: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_config, aGlobal, aArgs, "uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_config: "_ns, aError));
} }
case 26: { // suggest:uniffi_suggest_fn_func_raw_suggestion_url_matches case 28: { // suggest:uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_server
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingConverter<RustBuffer>>;
return Some(CallHandler::CallAsync(uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_server, aGlobal, aArgs, "uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_server: "_ns, aError));
}
case 29: { // suggest:uniffi_suggest_fn_func_raw_suggestion_url_matches
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<int8_t>, ScaffoldingConverter<RustBuffer>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<int8_t>, ScaffoldingConverter<RustBuffer>, ScaffoldingConverter<RustBuffer>>;
return Some(CallHandler::CallAsync(uniffi_suggest_fn_func_raw_suggestion_url_matches, aGlobal, aArgs, "uniffi_suggest_fn_func_raw_suggestion_url_matches: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_suggest_fn_func_raw_suggestion_url_matches, aGlobal, aArgs, "uniffi_suggest_fn_func_raw_suggestion_url_matches: "_ns, aError));
} }
case 27: { // tabs:uniffi_tabs_fn_clone_tabsbridgedengine case 30: { // tabs:uniffi_tabs_fn_clone_tabsbridgedengine
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
return Some(CallHandler::CallAsync(uniffi_tabs_fn_clone_tabsbridgedengine, aGlobal, aArgs, "uniffi_tabs_fn_clone_tabsbridgedengine: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_tabs_fn_clone_tabsbridgedengine, aGlobal, aArgs, "uniffi_tabs_fn_clone_tabsbridgedengine: "_ns, aError));
} }
case 28: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_apply case 31: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_apply
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsbridgedengine_apply, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsbridgedengine_apply: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsbridgedengine_apply, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsbridgedengine_apply: "_ns, aError));
} }
case 29: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_ensure_current_sync_id case 32: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_ensure_current_sync_id
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<RustBuffer>>;
return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsbridgedengine_ensure_current_sync_id, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsbridgedengine_ensure_current_sync_id: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsbridgedengine_ensure_current_sync_id, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsbridgedengine_ensure_current_sync_id: "_ns, aError));
} }
case 30: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_last_sync case 33: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_last_sync
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<int64_t>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<int64_t>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsbridgedengine_last_sync, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsbridgedengine_last_sync: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsbridgedengine_last_sync, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsbridgedengine_last_sync: "_ns, aError));
} }
case 31: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_prepare_for_sync case 34: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_prepare_for_sync
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<RustBuffer>>;
return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsbridgedengine_prepare_for_sync, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsbridgedengine_prepare_for_sync: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsbridgedengine_prepare_for_sync, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsbridgedengine_prepare_for_sync: "_ns, aError));
} }
case 32: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_reset case 35: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_reset
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsbridgedengine_reset, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsbridgedengine_reset: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsbridgedengine_reset, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsbridgedengine_reset: "_ns, aError));
} }
case 33: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_reset_sync_id case 36: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_reset_sync_id
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsbridgedengine_reset_sync_id, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsbridgedengine_reset_sync_id: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsbridgedengine_reset_sync_id, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsbridgedengine_reset_sync_id: "_ns, aError));
} }
case 34: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_set_last_sync case 37: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_set_last_sync
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<int64_t>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<int64_t>>;
return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsbridgedengine_set_last_sync, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsbridgedengine_set_last_sync: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsbridgedengine_set_last_sync, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsbridgedengine_set_last_sync: "_ns, aError));
} }
case 35: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_set_uploaded case 38: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_set_uploaded
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<int64_t>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<int64_t>, ScaffoldingConverter<RustBuffer>>;
return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsbridgedengine_set_uploaded, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsbridgedengine_set_uploaded: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsbridgedengine_set_uploaded, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsbridgedengine_set_uploaded: "_ns, aError));
} }
case 36: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_store_incoming case 39: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_store_incoming
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<RustBuffer>>;
return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsbridgedengine_store_incoming, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsbridgedengine_store_incoming: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsbridgedengine_store_incoming, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsbridgedengine_store_incoming: "_ns, aError));
} }
case 37: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_finished case 40: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_finished
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsbridgedengine_sync_finished, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsbridgedengine_sync_finished: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsbridgedengine_sync_finished, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsbridgedengine_sync_finished: "_ns, aError));
} }
case 38: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_id case 41: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_id
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsbridgedengine_sync_id, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsbridgedengine_sync_id: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsbridgedengine_sync_id, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsbridgedengine_sync_id: "_ns, aError));
} }
case 39: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_started case 42: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_started
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsbridgedengine_sync_started, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsbridgedengine_sync_started: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsbridgedengine_sync_started, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsbridgedengine_sync_started: "_ns, aError));
} }
case 40: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_wipe case 43: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_wipe
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsbridgedengine_wipe, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsbridgedengine_wipe: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsbridgedengine_wipe, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsbridgedengine_wipe: "_ns, aError));
} }
case 41: { // tabs:uniffi_tabs_fn_clone_tabsstore case 44: { // tabs:uniffi_tabs_fn_clone_tabsstore
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kTabsTabsStorePointerType>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kTabsTabsStorePointerType>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>>;
return Some(CallHandler::CallAsync(uniffi_tabs_fn_clone_tabsstore, aGlobal, aArgs, "uniffi_tabs_fn_clone_tabsstore: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_tabs_fn_clone_tabsstore, aGlobal, aArgs, "uniffi_tabs_fn_clone_tabsstore: "_ns, aError));
} }
case 42: { // tabs:uniffi_tabs_fn_constructor_tabsstore_new case 45: { // tabs:uniffi_tabs_fn_constructor_tabsstore_new
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kTabsTabsStorePointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kTabsTabsStorePointerType>, ScaffoldingConverter<RustBuffer>>;
return Some(CallHandler::CallAsync(uniffi_tabs_fn_constructor_tabsstore_new, aGlobal, aArgs, "uniffi_tabs_fn_constructor_tabsstore_new: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_tabs_fn_constructor_tabsstore_new, aGlobal, aArgs, "uniffi_tabs_fn_constructor_tabsstore_new: "_ns, aError));
} }
case 43: { // tabs:uniffi_tabs_fn_method_tabsstore_bridged_engine case 46: { // tabs:uniffi_tabs_fn_method_tabsstore_bridged_engine
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>>;
return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsstore_bridged_engine, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsstore_bridged_engine: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsstore_bridged_engine, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsstore_bridged_engine: "_ns, aError));
} }
case 44: { // tabs:uniffi_tabs_fn_method_tabsstore_get_all case 47: { // tabs:uniffi_tabs_fn_method_tabsstore_get_all
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>>;
return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsstore_get_all, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsstore_get_all: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsstore_get_all, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsstore_get_all: "_ns, aError));
} }
case 45: { // tabs:uniffi_tabs_fn_method_tabsstore_register_with_sync_manager case 48: { // tabs:uniffi_tabs_fn_method_tabsstore_register_with_sync_manager
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>>;
return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsstore_register_with_sync_manager, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsstore_register_with_sync_manager: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsstore_register_with_sync_manager, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsstore_register_with_sync_manager: "_ns, aError));
} }
case 46: { // tabs:uniffi_tabs_fn_method_tabsstore_set_local_tabs case 49: { // tabs:uniffi_tabs_fn_method_tabsstore_set_local_tabs
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>, ScaffoldingConverter<RustBuffer>>;
return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsstore_set_local_tabs, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsstore_set_local_tabs: "_ns, aError)); return Some(CallHandler::CallAsync(uniffi_tabs_fn_method_tabsstore_set_local_tabs, aGlobal, aArgs, "uniffi_tabs_fn_method_tabsstore_set_local_tabs: "_ns, aError));
} }
@ -333,222 +348,237 @@ bool UniFFICallSync(const GlobalObject& aGlobal, uint64_t aId, const Sequence<Un
CallHandler::CallSync(uniffi_relevancy_fn_method_relevancystore_calculate_metrics, aGlobal, aArgs, aReturnValue, "uniffi_relevancy_fn_method_relevancystore_calculate_metrics: "_ns, aError); CallHandler::CallSync(uniffi_relevancy_fn_method_relevancystore_calculate_metrics, aGlobal, aArgs, aReturnValue, "uniffi_relevancy_fn_method_relevancystore_calculate_metrics: "_ns, aError);
return true; return true;
} }
case 3: { // relevancy:uniffi_relevancy_fn_method_relevancystore_ingest case 3: { // relevancy:uniffi_relevancy_fn_method_relevancystore_close
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kRelevancyRelevancyStorePointerType>>;
CallHandler::CallSync(uniffi_relevancy_fn_method_relevancystore_close, aGlobal, aArgs, aReturnValue, "uniffi_relevancy_fn_method_relevancystore_close: "_ns, aError);
return true;
}
case 4: { // relevancy:uniffi_relevancy_fn_method_relevancystore_ingest
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kRelevancyRelevancyStorePointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kRelevancyRelevancyStorePointerType>, ScaffoldingConverter<RustBuffer>>;
CallHandler::CallSync(uniffi_relevancy_fn_method_relevancystore_ingest, aGlobal, aArgs, aReturnValue, "uniffi_relevancy_fn_method_relevancystore_ingest: "_ns, aError); CallHandler::CallSync(uniffi_relevancy_fn_method_relevancystore_ingest, aGlobal, aArgs, aReturnValue, "uniffi_relevancy_fn_method_relevancystore_ingest: "_ns, aError);
return true; return true;
} }
case 4: { // relevancy:uniffi_relevancy_fn_method_relevancystore_user_interest_vector case 5: { // relevancy:uniffi_relevancy_fn_method_relevancystore_interrupt
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kRelevancyRelevancyStorePointerType>>;
CallHandler::CallSync(uniffi_relevancy_fn_method_relevancystore_interrupt, aGlobal, aArgs, aReturnValue, "uniffi_relevancy_fn_method_relevancystore_interrupt: "_ns, aError);
return true;
}
case 6: { // relevancy:uniffi_relevancy_fn_method_relevancystore_user_interest_vector
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kRelevancyRelevancyStorePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kRelevancyRelevancyStorePointerType>>;
CallHandler::CallSync(uniffi_relevancy_fn_method_relevancystore_user_interest_vector, aGlobal, aArgs, aReturnValue, "uniffi_relevancy_fn_method_relevancystore_user_interest_vector: "_ns, aError); CallHandler::CallSync(uniffi_relevancy_fn_method_relevancystore_user_interest_vector, aGlobal, aArgs, aReturnValue, "uniffi_relevancy_fn_method_relevancystore_user_interest_vector: "_ns, aError);
return true; return true;
} }
case 5: { // remote_settings:uniffi_remote_settings_fn_clone_remotesettings case 7: { // remote_settings:uniffi_remote_settings_fn_clone_remotesettings
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsPointerType>, ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsPointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsPointerType>, ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsPointerType>>;
CallHandler::CallSync(uniffi_remote_settings_fn_clone_remotesettings, aGlobal, aArgs, aReturnValue, "uniffi_remote_settings_fn_clone_remotesettings: "_ns, aError); CallHandler::CallSync(uniffi_remote_settings_fn_clone_remotesettings, aGlobal, aArgs, aReturnValue, "uniffi_remote_settings_fn_clone_remotesettings: "_ns, aError);
return true; return true;
} }
case 6: { // remote_settings:uniffi_remote_settings_fn_constructor_remotesettings_new case 8: { // remote_settings:uniffi_remote_settings_fn_constructor_remotesettings_new
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsPointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsPointerType>, ScaffoldingConverter<RustBuffer>>;
CallHandler::CallSync(uniffi_remote_settings_fn_constructor_remotesettings_new, aGlobal, aArgs, aReturnValue, "uniffi_remote_settings_fn_constructor_remotesettings_new: "_ns, aError); CallHandler::CallSync(uniffi_remote_settings_fn_constructor_remotesettings_new, aGlobal, aArgs, aReturnValue, "uniffi_remote_settings_fn_constructor_remotesettings_new: "_ns, aError);
return true; return true;
} }
case 7: { // remote_settings:uniffi_remote_settings_fn_method_remotesettings_download_attachment_to_path case 9: { // remote_settings:uniffi_remote_settings_fn_method_remotesettings_download_attachment_to_path
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsPointerType>, ScaffoldingConverter<RustBuffer>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsPointerType>, ScaffoldingConverter<RustBuffer>, ScaffoldingConverter<RustBuffer>>;
CallHandler::CallSync(uniffi_remote_settings_fn_method_remotesettings_download_attachment_to_path, aGlobal, aArgs, aReturnValue, "uniffi_remote_settings_fn_method_remotesettings_download_attachment_to_path: "_ns, aError); CallHandler::CallSync(uniffi_remote_settings_fn_method_remotesettings_download_attachment_to_path, aGlobal, aArgs, aReturnValue, "uniffi_remote_settings_fn_method_remotesettings_download_attachment_to_path: "_ns, aError);
return true; return true;
} }
case 8: { // remote_settings:uniffi_remote_settings_fn_method_remotesettings_get_records case 10: { // remote_settings:uniffi_remote_settings_fn_method_remotesettings_get_records
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsPointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsPointerType>>;
CallHandler::CallSync(uniffi_remote_settings_fn_method_remotesettings_get_records, aGlobal, aArgs, aReturnValue, "uniffi_remote_settings_fn_method_remotesettings_get_records: "_ns, aError); CallHandler::CallSync(uniffi_remote_settings_fn_method_remotesettings_get_records, aGlobal, aArgs, aReturnValue, "uniffi_remote_settings_fn_method_remotesettings_get_records: "_ns, aError);
return true; return true;
} }
case 9: { // remote_settings:uniffi_remote_settings_fn_method_remotesettings_get_records_since case 11: { // remote_settings:uniffi_remote_settings_fn_method_remotesettings_get_records_since
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsPointerType>, ScaffoldingConverter<uint64_t>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsPointerType>, ScaffoldingConverter<uint64_t>>;
CallHandler::CallSync(uniffi_remote_settings_fn_method_remotesettings_get_records_since, aGlobal, aArgs, aReturnValue, "uniffi_remote_settings_fn_method_remotesettings_get_records_since: "_ns, aError); CallHandler::CallSync(uniffi_remote_settings_fn_method_remotesettings_get_records_since, aGlobal, aArgs, aReturnValue, "uniffi_remote_settings_fn_method_remotesettings_get_records_since: "_ns, aError);
return true; return true;
} }
case 10: { // suggest:uniffi_suggest_fn_clone_suggeststore case 12: { // suggest:uniffi_suggest_fn_clone_suggeststore
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>>;
CallHandler::CallSync(uniffi_suggest_fn_clone_suggeststore, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_clone_suggeststore: "_ns, aError); CallHandler::CallSync(uniffi_suggest_fn_clone_suggeststore, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_clone_suggeststore: "_ns, aError);
return true; return true;
} }
case 11: { // suggest:uniffi_suggest_fn_constructor_suggeststore_new case 13: { // suggest:uniffi_suggest_fn_constructor_suggeststore_new
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingConverter<RustBuffer>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingConverter<RustBuffer>, ScaffoldingConverter<RustBuffer>>;
CallHandler::CallSync(uniffi_suggest_fn_constructor_suggeststore_new, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_constructor_suggeststore_new: "_ns, aError); CallHandler::CallSync(uniffi_suggest_fn_constructor_suggeststore_new, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_constructor_suggeststore_new: "_ns, aError);
return true; return true;
} }
case 12: { // suggest:uniffi_suggest_fn_method_suggeststore_clear case 14: { // suggest:uniffi_suggest_fn_method_suggeststore_clear
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>>;
CallHandler::CallSync(uniffi_suggest_fn_method_suggeststore_clear, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_method_suggeststore_clear: "_ns, aError); CallHandler::CallSync(uniffi_suggest_fn_method_suggeststore_clear, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_method_suggeststore_clear: "_ns, aError);
return true; return true;
} }
case 13: { // suggest:uniffi_suggest_fn_method_suggeststore_clear_dismissed_suggestions case 15: { // suggest:uniffi_suggest_fn_method_suggeststore_clear_dismissed_suggestions
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>>;
CallHandler::CallSync(uniffi_suggest_fn_method_suggeststore_clear_dismissed_suggestions, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_method_suggeststore_clear_dismissed_suggestions: "_ns, aError); CallHandler::CallSync(uniffi_suggest_fn_method_suggeststore_clear_dismissed_suggestions, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_method_suggeststore_clear_dismissed_suggestions: "_ns, aError);
return true; return true;
} }
case 14: { // suggest:uniffi_suggest_fn_method_suggeststore_dismiss_suggestion case 16: { // suggest:uniffi_suggest_fn_method_suggeststore_dismiss_suggestion
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingConverter<RustBuffer>>;
CallHandler::CallSync(uniffi_suggest_fn_method_suggeststore_dismiss_suggestion, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_method_suggeststore_dismiss_suggestion: "_ns, aError); CallHandler::CallSync(uniffi_suggest_fn_method_suggeststore_dismiss_suggestion, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_method_suggeststore_dismiss_suggestion: "_ns, aError);
return true; return true;
} }
case 15: { // suggest:uniffi_suggest_fn_method_suggeststore_fetch_global_config case 17: { // suggest:uniffi_suggest_fn_method_suggeststore_fetch_global_config
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>>;
CallHandler::CallSync(uniffi_suggest_fn_method_suggeststore_fetch_global_config, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_method_suggeststore_fetch_global_config: "_ns, aError); CallHandler::CallSync(uniffi_suggest_fn_method_suggeststore_fetch_global_config, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_method_suggeststore_fetch_global_config: "_ns, aError);
return true; return true;
} }
case 16: { // suggest:uniffi_suggest_fn_method_suggeststore_fetch_provider_config case 18: { // suggest:uniffi_suggest_fn_method_suggeststore_fetch_provider_config
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingConverter<RustBuffer>>;
CallHandler::CallSync(uniffi_suggest_fn_method_suggeststore_fetch_provider_config, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_method_suggeststore_fetch_provider_config: "_ns, aError); CallHandler::CallSync(uniffi_suggest_fn_method_suggeststore_fetch_provider_config, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_method_suggeststore_fetch_provider_config: "_ns, aError);
return true; return true;
} }
case 17: { // suggest:uniffi_suggest_fn_method_suggeststore_ingest case 19: { // suggest:uniffi_suggest_fn_method_suggeststore_ingest
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingConverter<RustBuffer>>;
CallHandler::CallSync(uniffi_suggest_fn_method_suggeststore_ingest, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_method_suggeststore_ingest: "_ns, aError); CallHandler::CallSync(uniffi_suggest_fn_method_suggeststore_ingest, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_method_suggeststore_ingest: "_ns, aError);
return true; return true;
} }
case 18: { // suggest:uniffi_suggest_fn_method_suggeststore_interrupt case 20: { // suggest:uniffi_suggest_fn_method_suggeststore_interrupt
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>>;
CallHandler::CallSync(uniffi_suggest_fn_method_suggeststore_interrupt, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_method_suggeststore_interrupt: "_ns, aError); CallHandler::CallSync(uniffi_suggest_fn_method_suggeststore_interrupt, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_method_suggeststore_interrupt: "_ns, aError);
return true; return true;
} }
case 19: { // suggest:uniffi_suggest_fn_method_suggeststore_query case 21: { // suggest:uniffi_suggest_fn_method_suggeststore_query
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingConverter<RustBuffer>>;
CallHandler::CallSync(uniffi_suggest_fn_method_suggeststore_query, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_method_suggeststore_query: "_ns, aError); CallHandler::CallSync(uniffi_suggest_fn_method_suggeststore_query, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_method_suggeststore_query: "_ns, aError);
return true; return true;
} }
case 20: { // suggest:uniffi_suggest_fn_clone_suggeststorebuilder case 22: { // suggest:uniffi_suggest_fn_clone_suggeststorebuilder
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>>;
CallHandler::CallSync(uniffi_suggest_fn_clone_suggeststorebuilder, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_clone_suggeststorebuilder: "_ns, aError); CallHandler::CallSync(uniffi_suggest_fn_clone_suggeststorebuilder, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_clone_suggeststorebuilder: "_ns, aError);
return true; return true;
} }
case 21: { // suggest:uniffi_suggest_fn_constructor_suggeststorebuilder_new case 23: { // suggest:uniffi_suggest_fn_constructor_suggeststorebuilder_new
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>>;
CallHandler::CallSync(uniffi_suggest_fn_constructor_suggeststorebuilder_new, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_constructor_suggeststorebuilder_new: "_ns, aError); CallHandler::CallSync(uniffi_suggest_fn_constructor_suggeststorebuilder_new, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_constructor_suggeststorebuilder_new: "_ns, aError);
return true; return true;
} }
case 22: { // suggest:uniffi_suggest_fn_method_suggeststorebuilder_build case 24: { // suggest:uniffi_suggest_fn_method_suggeststorebuilder_build
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStorePointerType>, ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>>;
CallHandler::CallSync(uniffi_suggest_fn_method_suggeststorebuilder_build, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_method_suggeststorebuilder_build: "_ns, aError); CallHandler::CallSync(uniffi_suggest_fn_method_suggeststorebuilder_build, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_method_suggeststorebuilder_build: "_ns, aError);
return true; return true;
} }
case 23: { // suggest:uniffi_suggest_fn_method_suggeststorebuilder_cache_path case 25: { // suggest:uniffi_suggest_fn_method_suggeststorebuilder_cache_path
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingConverter<RustBuffer>>;
CallHandler::CallSync(uniffi_suggest_fn_method_suggeststorebuilder_cache_path, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_method_suggeststorebuilder_cache_path: "_ns, aError); CallHandler::CallSync(uniffi_suggest_fn_method_suggeststorebuilder_cache_path, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_method_suggeststorebuilder_cache_path: "_ns, aError);
return true; return true;
} }
case 24: { // suggest:uniffi_suggest_fn_method_suggeststorebuilder_data_path case 26: { // suggest:uniffi_suggest_fn_method_suggeststorebuilder_data_path
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingConverter<RustBuffer>>;
CallHandler::CallSync(uniffi_suggest_fn_method_suggeststorebuilder_data_path, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_method_suggeststorebuilder_data_path: "_ns, aError); CallHandler::CallSync(uniffi_suggest_fn_method_suggeststorebuilder_data_path, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_method_suggeststorebuilder_data_path: "_ns, aError);
return true; return true;
} }
case 25: { // suggest:uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_config case 27: { // suggest:uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_config
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingConverter<RustBuffer>>;
CallHandler::CallSync(uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_config, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_config: "_ns, aError); CallHandler::CallSync(uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_config, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_config: "_ns, aError);
return true; return true;
} }
case 26: { // suggest:uniffi_suggest_fn_func_raw_suggestion_url_matches case 28: { // suggest:uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_server
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>, ScaffoldingConverter<RustBuffer>>;
CallHandler::CallSync(uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_server, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_server: "_ns, aError);
return true;
}
case 29: { // suggest:uniffi_suggest_fn_func_raw_suggestion_url_matches
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<int8_t>, ScaffoldingConverter<RustBuffer>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<int8_t>, ScaffoldingConverter<RustBuffer>, ScaffoldingConverter<RustBuffer>>;
CallHandler::CallSync(uniffi_suggest_fn_func_raw_suggestion_url_matches, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_func_raw_suggestion_url_matches: "_ns, aError); CallHandler::CallSync(uniffi_suggest_fn_func_raw_suggestion_url_matches, aGlobal, aArgs, aReturnValue, "uniffi_suggest_fn_func_raw_suggestion_url_matches: "_ns, aError);
return true; return true;
} }
case 27: { // tabs:uniffi_tabs_fn_clone_tabsbridgedengine case 30: { // tabs:uniffi_tabs_fn_clone_tabsbridgedengine
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
CallHandler::CallSync(uniffi_tabs_fn_clone_tabsbridgedengine, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_clone_tabsbridgedengine: "_ns, aError); CallHandler::CallSync(uniffi_tabs_fn_clone_tabsbridgedengine, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_clone_tabsbridgedengine: "_ns, aError);
return true; return true;
} }
case 28: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_apply case 31: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_apply
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
CallHandler::CallSync(uniffi_tabs_fn_method_tabsbridgedengine_apply, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsbridgedengine_apply: "_ns, aError); CallHandler::CallSync(uniffi_tabs_fn_method_tabsbridgedengine_apply, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsbridgedengine_apply: "_ns, aError);
return true; return true;
} }
case 29: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_ensure_current_sync_id case 32: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_ensure_current_sync_id
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<RustBuffer>>;
CallHandler::CallSync(uniffi_tabs_fn_method_tabsbridgedengine_ensure_current_sync_id, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsbridgedengine_ensure_current_sync_id: "_ns, aError); CallHandler::CallSync(uniffi_tabs_fn_method_tabsbridgedengine_ensure_current_sync_id, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsbridgedengine_ensure_current_sync_id: "_ns, aError);
return true; return true;
} }
case 30: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_last_sync case 33: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_last_sync
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<int64_t>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<int64_t>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
CallHandler::CallSync(uniffi_tabs_fn_method_tabsbridgedengine_last_sync, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsbridgedengine_last_sync: "_ns, aError); CallHandler::CallSync(uniffi_tabs_fn_method_tabsbridgedengine_last_sync, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsbridgedengine_last_sync: "_ns, aError);
return true; return true;
} }
case 31: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_prepare_for_sync case 34: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_prepare_for_sync
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<RustBuffer>>;
CallHandler::CallSync(uniffi_tabs_fn_method_tabsbridgedengine_prepare_for_sync, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsbridgedengine_prepare_for_sync: "_ns, aError); CallHandler::CallSync(uniffi_tabs_fn_method_tabsbridgedengine_prepare_for_sync, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsbridgedengine_prepare_for_sync: "_ns, aError);
return true; return true;
} }
case 32: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_reset case 35: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_reset
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
CallHandler::CallSync(uniffi_tabs_fn_method_tabsbridgedengine_reset, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsbridgedengine_reset: "_ns, aError); CallHandler::CallSync(uniffi_tabs_fn_method_tabsbridgedengine_reset, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsbridgedengine_reset: "_ns, aError);
return true; return true;
} }
case 33: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_reset_sync_id case 36: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_reset_sync_id
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
CallHandler::CallSync(uniffi_tabs_fn_method_tabsbridgedengine_reset_sync_id, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsbridgedengine_reset_sync_id: "_ns, aError); CallHandler::CallSync(uniffi_tabs_fn_method_tabsbridgedengine_reset_sync_id, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsbridgedengine_reset_sync_id: "_ns, aError);
return true; return true;
} }
case 34: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_set_last_sync case 37: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_set_last_sync
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<int64_t>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<int64_t>>;
CallHandler::CallSync(uniffi_tabs_fn_method_tabsbridgedengine_set_last_sync, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsbridgedengine_set_last_sync: "_ns, aError); CallHandler::CallSync(uniffi_tabs_fn_method_tabsbridgedengine_set_last_sync, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsbridgedengine_set_last_sync: "_ns, aError);
return true; return true;
} }
case 35: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_set_uploaded case 38: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_set_uploaded
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<int64_t>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<int64_t>, ScaffoldingConverter<RustBuffer>>;
CallHandler::CallSync(uniffi_tabs_fn_method_tabsbridgedengine_set_uploaded, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsbridgedengine_set_uploaded: "_ns, aError); CallHandler::CallSync(uniffi_tabs_fn_method_tabsbridgedengine_set_uploaded, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsbridgedengine_set_uploaded: "_ns, aError);
return true; return true;
} }
case 36: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_store_incoming case 39: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_store_incoming
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<RustBuffer>>;
CallHandler::CallSync(uniffi_tabs_fn_method_tabsbridgedengine_store_incoming, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsbridgedengine_store_incoming: "_ns, aError); CallHandler::CallSync(uniffi_tabs_fn_method_tabsbridgedengine_store_incoming, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsbridgedengine_store_incoming: "_ns, aError);
return true; return true;
} }
case 37: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_finished case 40: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_finished
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
CallHandler::CallSync(uniffi_tabs_fn_method_tabsbridgedengine_sync_finished, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsbridgedengine_sync_finished: "_ns, aError); CallHandler::CallSync(uniffi_tabs_fn_method_tabsbridgedengine_sync_finished, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsbridgedengine_sync_finished: "_ns, aError);
return true; return true;
} }
case 38: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_id case 41: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_id
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
CallHandler::CallSync(uniffi_tabs_fn_method_tabsbridgedengine_sync_id, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsbridgedengine_sync_id: "_ns, aError); CallHandler::CallSync(uniffi_tabs_fn_method_tabsbridgedengine_sync_id, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsbridgedengine_sync_id: "_ns, aError);
return true; return true;
} }
case 39: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_started case 42: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_started
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
CallHandler::CallSync(uniffi_tabs_fn_method_tabsbridgedengine_sync_started, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsbridgedengine_sync_started: "_ns, aError); CallHandler::CallSync(uniffi_tabs_fn_method_tabsbridgedengine_sync_started, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsbridgedengine_sync_started: "_ns, aError);
return true; return true;
} }
case 40: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_wipe case 43: { // tabs:uniffi_tabs_fn_method_tabsbridgedengine_wipe
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
CallHandler::CallSync(uniffi_tabs_fn_method_tabsbridgedengine_wipe, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsbridgedengine_wipe: "_ns, aError); CallHandler::CallSync(uniffi_tabs_fn_method_tabsbridgedengine_wipe, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsbridgedengine_wipe: "_ns, aError);
return true; return true;
} }
case 41: { // tabs:uniffi_tabs_fn_clone_tabsstore case 44: { // tabs:uniffi_tabs_fn_clone_tabsstore
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kTabsTabsStorePointerType>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kTabsTabsStorePointerType>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>>;
CallHandler::CallSync(uniffi_tabs_fn_clone_tabsstore, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_clone_tabsstore: "_ns, aError); CallHandler::CallSync(uniffi_tabs_fn_clone_tabsstore, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_clone_tabsstore: "_ns, aError);
return true; return true;
} }
case 42: { // tabs:uniffi_tabs_fn_constructor_tabsstore_new case 45: { // tabs:uniffi_tabs_fn_constructor_tabsstore_new
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kTabsTabsStorePointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kTabsTabsStorePointerType>, ScaffoldingConverter<RustBuffer>>;
CallHandler::CallSync(uniffi_tabs_fn_constructor_tabsstore_new, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_constructor_tabsstore_new: "_ns, aError); CallHandler::CallSync(uniffi_tabs_fn_constructor_tabsstore_new, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_constructor_tabsstore_new: "_ns, aError);
return true; return true;
} }
case 43: { // tabs:uniffi_tabs_fn_method_tabsstore_bridged_engine case 46: { // tabs:uniffi_tabs_fn_method_tabsstore_bridged_engine
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>>;
CallHandler::CallSync(uniffi_tabs_fn_method_tabsstore_bridged_engine, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsstore_bridged_engine: "_ns, aError); CallHandler::CallSync(uniffi_tabs_fn_method_tabsstore_bridged_engine, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsstore_bridged_engine: "_ns, aError);
return true; return true;
} }
case 44: { // tabs:uniffi_tabs_fn_method_tabsstore_get_all case 47: { // tabs:uniffi_tabs_fn_method_tabsstore_get_all
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>>;
CallHandler::CallSync(uniffi_tabs_fn_method_tabsstore_get_all, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsstore_get_all: "_ns, aError); CallHandler::CallSync(uniffi_tabs_fn_method_tabsstore_get_all, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsstore_get_all: "_ns, aError);
return true; return true;
} }
case 45: { // tabs:uniffi_tabs_fn_method_tabsstore_register_with_sync_manager case 48: { // tabs:uniffi_tabs_fn_method_tabsstore_register_with_sync_manager
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>>;
CallHandler::CallSync(uniffi_tabs_fn_method_tabsstore_register_with_sync_manager, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsstore_register_with_sync_manager: "_ns, aError); CallHandler::CallSync(uniffi_tabs_fn_method_tabsstore_register_with_sync_manager, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsstore_register_with_sync_manager: "_ns, aError);
return true; return true;
} }
case 46: { // tabs:uniffi_tabs_fn_method_tabsstore_set_local_tabs case 49: { // tabs:uniffi_tabs_fn_method_tabsstore_set_local_tabs
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>, ScaffoldingConverter<RustBuffer>>; using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>, ScaffoldingConverter<RustBuffer>>;
CallHandler::CallSync(uniffi_tabs_fn_method_tabsstore_set_local_tabs, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsstore_set_local_tabs: "_ns, aError); CallHandler::CallSync(uniffi_tabs_fn_method_tabsstore_set_local_tabs, aGlobal, aArgs, aReturnValue, "uniffi_tabs_fn_method_tabsstore_set_local_tabs: "_ns, aError);
return true; return true;