Bug 1950499 - Vendor app-services d83fcd87f69a23930fed279ab5d2c56173a61db7. r=bdk

Differential Revision: https://phabricator.services.mozilla.com/D239665
This commit is contained in:
Mark Banner
2025-03-03 09:00:40 +00:00
parent f6fef7bdb8
commit 678fa38cbd
54 changed files with 11418 additions and 1190 deletions

View File

@@ -70,9 +70,9 @@ git = "https://github.com/jfkthame/mapped_hyph.git"
rev = "eff105f6ad7ec9b79816cfc1985a28e5340ad14b" rev = "eff105f6ad7ec9b79816cfc1985a28e5340ad14b"
replace-with = "vendored-sources" replace-with = "vendored-sources"
[source."git+https://github.com/mozilla/application-services?rev=25934715ecc08fc922c80797c637dea64ee742d1"] [source."git+https://github.com/mozilla/application-services?rev=d83fcd87f69a23930fed279ab5d2c56173a61db7"]
git = "https://github.com/mozilla/application-services" git = "https://github.com/mozilla/application-services"
rev = "25934715ecc08fc922c80797c637dea64ee742d1" rev = "d83fcd87f69a23930fed279ab5d2c56173a61db7"
replace-with = "vendored-sources" replace-with = "vendored-sources"
[source."git+https://github.com/mozilla/audioipc?rev=e6f44a2bd1e57d11dfc737632a9e849077632330"] [source."git+https://github.com/mozilla/audioipc?rev=e6f44a2bd1e57d11dfc737632a9e849077632330"]

33
Cargo.lock generated
View File

@@ -1795,7 +1795,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=25934715ecc08fc922c80797c637dea64ee742d1#25934715ecc08fc922c80797c637dea64ee742d1" source = "git+https://github.com/mozilla/application-services?rev=d83fcd87f69a23930fed279ab5d2c56173a61db7#d83fcd87f69a23930fed279ab5d2c56173a61db7"
dependencies = [ dependencies = [
"error-support-macros", "error-support-macros",
"lazy_static", "lazy_static",
@@ -1807,7 +1807,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=25934715ecc08fc922c80797c637dea64ee742d1#25934715ecc08fc922c80797c637dea64ee742d1" source = "git+https://github.com/mozilla/application-services?rev=d83fcd87f69a23930fed279ab5d2c56173a61db7#d83fcd87f69a23930fed279ab5d2c56173a61db7"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -1918,7 +1918,7 @@ dependencies = [
[[package]] [[package]]
name = "firefox-versioning" name = "firefox-versioning"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/mozilla/application-services?rev=25934715ecc08fc922c80797c637dea64ee742d1#25934715ecc08fc922c80797c637dea64ee742d1" source = "git+https://github.com/mozilla/application-services?rev=d83fcd87f69a23930fed279ab5d2c56173a61db7#d83fcd87f69a23930fed279ab5d2c56173a61db7"
dependencies = [ dependencies = [
"serde_json", "serde_json",
"thiserror 1.999.999", "thiserror 1.999.999",
@@ -3194,7 +3194,7 @@ 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=25934715ecc08fc922c80797c637dea64ee742d1#25934715ecc08fc922c80797c637dea64ee742d1" source = "git+https://github.com/mozilla/application-services?rev=d83fcd87f69a23930fed279ab5d2c56173a61db7#d83fcd87f69a23930fed279ab5d2c56173a61db7"
dependencies = [ dependencies = [
"lazy_static", "lazy_static",
"parking_lot", "parking_lot",
@@ -4859,7 +4859,7 @@ checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba"
[[package]] [[package]]
name = "payload-support" name = "payload-support"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/mozilla/application-services?rev=25934715ecc08fc922c80797c637dea64ee742d1#25934715ecc08fc922c80797c637dea64ee742d1" source = "git+https://github.com/mozilla/application-services?rev=d83fcd87f69a23930fed279ab5d2c56173a61db7#d83fcd87f69a23930fed279ab5d2c56173a61db7"
dependencies = [ dependencies = [
"serde", "serde",
"serde_derive", "serde_derive",
@@ -5354,7 +5354,7 @@ 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=25934715ecc08fc922c80797c637dea64ee742d1#25934715ecc08fc922c80797c637dea64ee742d1" source = "git+https://github.com/mozilla/application-services?rev=d83fcd87f69a23930fed279ab5d2c56173a61db7#d83fcd87f69a23930fed279ab5d2c56173a61db7"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"base64 0.21.3", "base64 0.21.3",
@@ -5379,7 +5379,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=25934715ecc08fc922c80797c637dea64ee742d1#25934715ecc08fc922c80797c637dea64ee742d1" source = "git+https://github.com/mozilla/application-services?rev=d83fcd87f69a23930fed279ab5d2c56173a61db7#d83fcd87f69a23930fed279ab5d2c56173a61db7"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"camino", "camino",
@@ -5661,11 +5661,12 @@ dependencies = [
[[package]] [[package]]
name = "search" name = "search"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/mozilla/application-services?rev=25934715ecc08fc922c80797c637dea64ee742d1#25934715ecc08fc922c80797c637dea64ee742d1" source = "git+https://github.com/mozilla/application-services?rev=d83fcd87f69a23930fed279ab5d2c56173a61db7#d83fcd87f69a23930fed279ab5d2c56173a61db7"
dependencies = [ dependencies = [
"error-support", "error-support",
"firefox-versioning", "firefox-versioning",
"parking_lot", "parking_lot",
"remote_settings",
"serde", "serde",
"serde_json", "serde_json",
"thiserror 1.999.999", "thiserror 1.999.999",
@@ -5950,7 +5951,7 @@ 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=25934715ecc08fc922c80797c637dea64ee742d1#25934715ecc08fc922c80797c637dea64ee742d1" source = "git+https://github.com/mozilla/application-services?rev=d83fcd87f69a23930fed279ab5d2c56173a61db7#d83fcd87f69a23930fed279ab5d2c56173a61db7"
dependencies = [ dependencies = [
"interrupt-support", "interrupt-support",
"lazy_static", "lazy_static",
@@ -6150,7 +6151,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=25934715ecc08fc922c80797c637dea64ee742d1#25934715ecc08fc922c80797c637dea64ee742d1" source = "git+https://github.com/mozilla/application-services?rev=d83fcd87f69a23930fed279ab5d2c56173a61db7#d83fcd87f69a23930fed279ab5d2c56173a61db7"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"chrono", "chrono",
@@ -6202,7 +6203,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=25934715ecc08fc922c80797c637dea64ee742d1#25934715ecc08fc922c80797c637dea64ee742d1" source = "git+https://github.com/mozilla/application-services?rev=d83fcd87f69a23930fed279ab5d2c56173a61db7#d83fcd87f69a23930fed279ab5d2c56173a61db7"
dependencies = [ dependencies = [
"base64 0.21.3", "base64 0.21.3",
"rand", "rand",
@@ -6213,7 +6214,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=25934715ecc08fc922c80797c637dea64ee742d1#25934715ecc08fc922c80797c637dea64ee742d1" source = "git+https://github.com/mozilla/application-services?rev=d83fcd87f69a23930fed279ab5d2c56173a61db7#d83fcd87f69a23930fed279ab5d2c56173a61db7"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"error-support", "error-support",
@@ -6253,7 +6254,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=25934715ecc08fc922c80797c637dea64ee742d1#25934715ecc08fc922c80797c637dea64ee742d1" source = "git+https://github.com/mozilla/application-services?rev=d83fcd87f69a23930fed279ab5d2c56173a61db7#d83fcd87f69a23930fed279ab5d2c56173a61db7"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"error-support", "error-support",
@@ -6595,7 +6596,7 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba"
[[package]] [[package]]
name = "types" name = "types"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/mozilla/application-services?rev=25934715ecc08fc922c80797c637dea64ee742d1#25934715ecc08fc922c80797c637dea64ee742d1" source = "git+https://github.com/mozilla/application-services?rev=d83fcd87f69a23930fed279ab5d2c56173a61db7#d83fcd87f69a23930fed279ab5d2c56173a61db7"
dependencies = [ dependencies = [
"rusqlite", "rusqlite",
"serde", "serde",
@@ -6975,7 +6976,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=25934715ecc08fc922c80797c637dea64ee742d1#25934715ecc08fc922c80797c637dea64ee742d1" source = "git+https://github.com/mozilla/application-services?rev=d83fcd87f69a23930fed279ab5d2c56173a61db7#d83fcd87f69a23930fed279ab5d2c56173a61db7"
dependencies = [ dependencies = [
"ffi-support", "ffi-support",
"log", "log",
@@ -7134,7 +7135,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=25934715ecc08fc922c80797c637dea64ee742d1#25934715ecc08fc922c80797c637dea64ee742d1" source = "git+https://github.com/mozilla/application-services?rev=d83fcd87f69a23930fed279ab5d2c56173a61db7#d83fcd87f69a23930fed279ab5d2c56173a61db7"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"error-support", "error-support",

View File

@@ -228,14 +228,14 @@ malloc_size_of_derive = { path = "xpcom/rust/malloc_size_of_derive" }
objc = { git = "https://github.com/glandium/rust-objc", rev = "4de89f5aa9851ceca4d40e7ac1e2759410c04324" } objc = { git = "https://github.com/glandium/rust-objc", rev = "4de89f5aa9851ceca4d40e7ac1e2759410c04324" }
# 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 = "25934715ecc08fc922c80797c637dea64ee742d1" } interrupt-support = { git = "https://github.com/mozilla/application-services", rev = "d83fcd87f69a23930fed279ab5d2c56173a61db7" }
relevancy = { git = "https://github.com/mozilla/application-services", rev = "25934715ecc08fc922c80797c637dea64ee742d1" } relevancy = { git = "https://github.com/mozilla/application-services", rev = "d83fcd87f69a23930fed279ab5d2c56173a61db7" }
search = { git = "https://github.com/mozilla/application-services", rev = "25934715ecc08fc922c80797c637dea64ee742d1" } search = { git = "https://github.com/mozilla/application-services", rev = "d83fcd87f69a23930fed279ab5d2c56173a61db7" }
sql-support = { git = "https://github.com/mozilla/application-services", rev = "25934715ecc08fc922c80797c637dea64ee742d1" } sql-support = { git = "https://github.com/mozilla/application-services", rev = "d83fcd87f69a23930fed279ab5d2c56173a61db7" }
suggest = { git = "https://github.com/mozilla/application-services", rev = "25934715ecc08fc922c80797c637dea64ee742d1" } suggest = { git = "https://github.com/mozilla/application-services", rev = "d83fcd87f69a23930fed279ab5d2c56173a61db7" }
sync15 = { git = "https://github.com/mozilla/application-services", rev = "25934715ecc08fc922c80797c637dea64ee742d1" } sync15 = { git = "https://github.com/mozilla/application-services", rev = "d83fcd87f69a23930fed279ab5d2c56173a61db7" }
tabs = { git = "https://github.com/mozilla/application-services", rev = "25934715ecc08fc922c80797c637dea64ee742d1" } tabs = { git = "https://github.com/mozilla/application-services", rev = "d83fcd87f69a23930fed279ab5d2c56173a61db7" }
viaduct = { git = "https://github.com/mozilla/application-services", rev = "25934715ecc08fc922c80797c637dea64ee742d1" } viaduct = { git = "https://github.com/mozilla/application-services", rev = "d83fcd87f69a23930fed279ab5d2c56173a61db7" }
webext-storage = { git = "https://github.com/mozilla/application-services", rev = "25934715ecc08fc922c80797c637dea64ee742d1" } webext-storage = { git = "https://github.com/mozilla/application-services", rev = "d83fcd87f69a23930fed279ab5d2c56173a61db7" }
allocator-api2 = { path = "third_party/rust/allocator-api2" } allocator-api2 = { path = "third_party/rust/allocator-api2" }

View File

@@ -1 +1 @@
{"files":{"Cargo.toml":"f94edc7d050656bb0e20fe2b2db8505642b79d89fb4057e60c31d98ea512e209","README.md":"69ccc6e378995b9d490d64e23b42ea1d7a9e3232e3dae6fabf1f955786a49931","build.rs":"c8d3c38c1208eea36224662b284d8daf3e7ad1b07d22d750524f3da1cc66ccca","src/errorsupport.udl":"8f8e5711913ffd1b515ec60028529768990df51001e6125d4b83c948b41c4466","src/handling.rs":"6e0568b18d426531cb2ae9967c8dd0d51ece5a065f68b15eeb308b995edaa167","src/lib.rs":"3fd547de9565a2d63af32b4dae0357aafc2216bde173251bf76dd0c6b121a30c","src/macros.rs":"0d03f82fab20c96a182f941baf3fcf2a286b00fea871ee7fd8e339abc14f9522","src/redact.rs":"c9a4df1a87be68b15d583587bda941d4c60a1d0449e2d43ff99f3611a290a863","src/reporting.rs":"b8e03402edf3111718fc9c2ec179622307f4a117db05ac220ead631c9de28362","uniffi.toml":"af91bcd8e7b1fa3f475a5e556979ff23c57b338395e0b65abc1cb1a0ee823e23"},"package":null} {"files":{"Cargo.toml":"8eb17651996280a83f998c7c5199e0692e859389e86b33729c67801aff9f03bb","README.md":"69ccc6e378995b9d490d64e23b42ea1d7a9e3232e3dae6fabf1f955786a49931","build.rs":"c8d3c38c1208eea36224662b284d8daf3e7ad1b07d22d750524f3da1cc66ccca","src/errorsupport.udl":"8f8e5711913ffd1b515ec60028529768990df51001e6125d4b83c948b41c4466","src/handling.rs":"6e0568b18d426531cb2ae9967c8dd0d51ece5a065f68b15eeb308b995edaa167","src/lib.rs":"1e41747d06a0d032c9601df85dd6e95001e432ae95a75dcca859355cbadef3b0","src/macros.rs":"0d03f82fab20c96a182f941baf3fcf2a286b00fea871ee7fd8e339abc14f9522","src/redact.rs":"c9a4df1a87be68b15d583587bda941d4c60a1d0449e2d43ff99f3611a290a863","src/reporting.rs":"f4af35d5fb5bf0ebef6dc6595edac6351e1dae2bff989c18810480fae2202168","uniffi.toml":"af91bcd8e7b1fa3f475a5e556979ff23c57b338395e0b65abc1cb1a0ee823e23"},"package":null}

View File

@@ -24,6 +24,9 @@ autobenches = false
readme = "README.md" readme = "README.md"
license = "MPL-2.0" license = "MPL-2.0"
[features]
backtrace = ["dep:backtrace"]
[lib] [lib]
name = "error_support" name = "error_support"
path = "src/lib.rs" path = "src/lib.rs"

View File

@@ -16,6 +16,18 @@ pub mod backtrace {
pub struct Backtrace; pub struct Backtrace;
impl Backtrace {
pub fn new() -> Self {
Backtrace
}
}
impl Default for Backtrace {
fn default() -> Self {
Self::new()
}
}
impl fmt::Debug for Backtrace { impl fmt::Debug for Backtrace {
#[cold] #[cold]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -32,6 +44,8 @@ pub use reporting::{
report_breadcrumb, report_error_to_app, set_application_error_reporter, report_breadcrumb, report_error_to_app, set_application_error_reporter,
unset_application_error_reporter, ApplicationErrorReporter, unset_application_error_reporter, ApplicationErrorReporter,
}; };
// These are exposed specifically for tests
pub use reporting::{ArcReporterAdapter, TestErrorReporter};
pub use error_support_macros::handle_error; pub use error_support_macros::handle_error;
@@ -86,7 +100,7 @@ macro_rules! define_error_wrapper {
#[cfg(feature = "backtrace")] #[cfg(feature = "backtrace")]
#[cold] #[cold]
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
let mut bt = self.backtrace.unwrap().lock().unwrap(); let mut bt = self.backtrace.as_ref().unwrap().lock().unwrap();
bt.resolve(); bt.resolve();
write!(f, "{:?}\n\n{}", bt, self.kind) write!(f, "{:?}\n\n{}", bt, self.kind)
} }

View File

@@ -4,6 +4,7 @@
use parking_lot::RwLock; use parking_lot::RwLock;
use std::sync::atomic::{AtomicU32, Ordering}; use std::sync::atomic::{AtomicU32, Ordering};
use std::sync::{Arc, Mutex};
/// Counter for breadcrumb messages /// Counter for breadcrumb messages
/// ///
@@ -69,3 +70,59 @@ pub fn report_breadcrumb(message: String, module: String, line: u32, column: u32
.read() .read()
.report_breadcrumb(message, module, line, column); .report_breadcrumb(message, module, line, column);
} }
// Test error reporter that captures reported errors
// You should use this when you want to validate that `report_error` actually reports what you
// epect and
#[derive(Default)]
pub struct TestErrorReporter {
errors: Mutex<Vec<(String, String)>>,
}
impl TestErrorReporter {
pub fn new() -> Self {
Self {
errors: Mutex::new(Vec::new()),
}
}
pub fn get_errors(&self) -> Vec<(String, String)> {
self.errors.lock().unwrap().clone()
}
}
impl ApplicationErrorReporter for TestErrorReporter {
fn report_error(&self, type_name: String, message: String) {
if let Ok(mut errors) = self.errors.lock() {
errors.push((type_name, message));
}
}
fn report_breadcrumb(&self, _message: String, _module: String, _line: u32, _column: u32) {}
}
/// An adapter that implements `ApplicationErrorReporter` and
/// delegates all calls to an `Arc<TestErrorReporter>`.
///
/// Because `set_application_error_reporter` requires a
/// `Box<dyn ApplicationErrorReporter>`, we can't directly pass
/// an `Arc<TestErrorReporter>`; this adapter solves the mismatch.
pub struct ArcReporterAdapter {
inner: Arc<TestErrorReporter>,
}
impl ArcReporterAdapter {
pub fn new(inner: Arc<TestErrorReporter>) -> Self {
Self { inner }
}
}
impl ApplicationErrorReporter for ArcReporterAdapter {
fn report_error(&self, type_name: String, message: String) {
self.inner.report_error(type_name, message)
}
fn report_breadcrumb(&self, message: String, module: String, line: u32, column: u32) {
self.inner.report_breadcrumb(message, module, line, column)
}
}

View File

@@ -1 +1 @@
{"files":{"Cargo.toml":"6765e7643f3e8ad46145166225fa93a08e8a5eb327eca1460340b29c29cd73f5","src/bin/generate-test-data.rs":"7cc80b56929091d02675b9dd9bf4c657a95cda502656cf2ec8d91f56d7a393c7","src/db.rs":"d9dd44501ee3b19c696d8830d3036f7bfe0e8ad7751d5a057f5d8295ebf0bd4f","src/error.rs":"3a1308e65440769d9435fc95528d4ef42994c84d88e1da04ba058491dea387c4","src/ingest.rs":"9f8f7584be5ed27dc962d9137eaa4730948356c724f687e03048a8370c9ed889","src/interest.rs":"e4369a1280867438bca12746f71288a03b4d5e180e156f4bc0335046012565f7","src/lib.rs":"e02c30074fe645fd0ffabe8a2b9fd400e25905c9a8e11030f77524ff7582dd92","src/ranker.rs":"e71414fe79ade26f3c79dceb5211af4f37984a9cded8c938dc1da8d8d28c2ad3","src/rs.rs":"fb12d29f75a59af1bfdd320ad01f9bb5a03cf5a3f84738ebdaccb67b84695eef","src/schema.rs":"38ea82679da2729a571aad936f96469e732ec1c104d7c21fd869842f7a5f30a3","src/url_hash.rs":"2e908316fb70923644d1990dbf470d69ce2f5e99b0c5c3d95ec691590be8ffa5","test-data":"1ef2cd092d59e7e126cd4a514af983d449ed9f9c98708702fd237464a76c2b5e"},"package":null} {"files":{"Cargo.toml":"6765e7643f3e8ad46145166225fa93a08e8a5eb327eca1460340b29c29cd73f5","src/bin/generate-test-data.rs":"7cc80b56929091d02675b9dd9bf4c657a95cda502656cf2ec8d91f56d7a393c7","src/db.rs":"d9dd44501ee3b19c696d8830d3036f7bfe0e8ad7751d5a057f5d8295ebf0bd4f","src/error.rs":"3a1308e65440769d9435fc95528d4ef42994c84d88e1da04ba058491dea387c4","src/ingest.rs":"9f8f7584be5ed27dc962d9137eaa4730948356c724f687e03048a8370c9ed889","src/interest.rs":"e4369a1280867438bca12746f71288a03b4d5e180e156f4bc0335046012565f7","src/lib.rs":"1e57d2f7ca6452f6fe6e5f89a21e33292a86a2a5174b2e541473a69060fa4a32","src/ranker.rs":"e71414fe79ade26f3c79dceb5211af4f37984a9cded8c938dc1da8d8d28c2ad3","src/rs.rs":"fb12d29f75a59af1bfdd320ad01f9bb5a03cf5a3f84738ebdaccb67b84695eef","src/schema.rs":"38ea82679da2729a571aad936f96469e732ec1c104d7c21fd869842f7a5f30a3","src/url_hash.rs":"2e908316fb70923644d1990dbf470d69ce2f5e99b0c5c3d95ec691590be8ffa5","test-data":"1ef2cd092d59e7e126cd4a514af983d449ed9f9c98708702fd237464a76c2b5e"},"package":null}

View File

@@ -29,7 +29,7 @@ pub use ranker::score;
use error_support::handle_error; use error_support::handle_error;
use db::BanditData; use db::BanditData;
use std::collections::HashMap; use std::{collections::HashMap, sync::Arc};
uniffi::setup_scaffolding!(); uniffi::setup_scaffolding!();
@@ -46,8 +46,13 @@ impl RelevancyStore {
/// Construct a new RelevancyStore /// Construct a new RelevancyStore
/// ///
/// This is non-blocking since databases and other resources are lazily opened. /// This is non-blocking since databases and other resources are lazily opened.
#[uniffi::constructor] #[uniffi::constructor(default(remote_settings_service=None))]
pub fn new(db_path: String) -> Self { pub fn new(
db_path: String,
#[allow(unused)] remote_settings_service: Option<
Arc<remote_settings::RemoteSettingsService>,
>,
) -> Self {
Self { Self {
db: RelevancyDb::new(db_path), db: RelevancyDb::new(db_path),
cache: Mutex::new(BanditCache::new()), cache: Mutex::new(BanditCache::new()),
@@ -307,8 +312,10 @@ mod test {
} }
fn setup_store(test_id: &'static str) -> RelevancyStore { fn setup_store(test_id: &'static str) -> RelevancyStore {
let relevancy_store = let relevancy_store = RelevancyStore::new(
RelevancyStore::new(format!("file:test_{test_id}_data?mode=memory&cache=shared")); format!("file:test_{test_id}_data?mode=memory&cache=shared"),
None,
);
relevancy_store relevancy_store
.db .db
.read_write(|dao| { .read_write(|dao| {

View File

@@ -1 +1 @@
{"files":{"Cargo.toml":"d9eb25783f4d9983b705ded68b5fedf39d73257b19bbf688a5c969c49ebd675f","dumps/main/attachments/regions/world":"00b308033d44f61612b962f572765d14a3999586d92fc8b9fff2217a1ae070e8","dumps/main/attachments/regions/world-buffered":"1d3ed6954fac2a5b31302f5d3e8186c5fa08a20239afc0643ca5dfbb4d8a86fc","dumps/main/attachments/regions/world-buffered.meta.json":"914a71376a152036aceccb6877e079fbb9e3373c6219f24f00dd30e901a72cce","dumps/main/attachments/regions/world.meta.json":"2a47d77834997b98e563265d299723e7f7fd64c8c7a5731afc722862333d6fbd","dumps/main/regions.json":"e8990158373f82d3f89fed5089cf29e4177cc85904479128728e05025e9a0c0c","dumps/main/search-telemetry-v2.json":"1e3f49571183aa5db30c0877f0b291adb26ea7b81c04b16eac4f0320e9134a34","src/cache.rs":"c6179802017b43885136e7d64004890cc13e8c2d4742e04073cf404b578f63db","src/client.rs":"f48e0d9a9855e90cd3ff7ec3f539f965962a9bf2df2aa106bb006d8ac3571cdc","src/config.rs":"0294f122c76570c3df1de876289a6e70d0b03b4e8221a34ed7b893a377e68be1","src/error.rs":"20e40a0229842e12888bc43c4159e078f1d09272a43c51dae87989f76952f93b","src/jexl_filter.rs":"e085f92b0ef9031106cf5d4999dbb19f467494c029f324b25d0098506b37b2e1","src/lib.rs":"b23a82dbf7335ca0400347b0e98e7d8e92e22c79a234c8f8b1eb61f56b6fa5b8","src/macros.rs":"19735d74b6ce8d1fc21a85c39787a271f09a849a310db16ba36219aba9106736","src/schema.rs":"348e0d5ad1840aaae796b537d21381ef91bd75be262138bfec376d9f88d205b3","src/service.rs":"5445803fc9f768f6b40514bfb1add437baf6d868b67fc29a349dda70923c8b5f","src/signatures.rs":"5946518b69265be9da908097c0e994df24c77a36e5881eb29bb0f4107018279d","src/storage.rs":"5ae489964d82a0305a6b250d92f4c1925cc722e44890c24f681dd97b0258b9f4","uniffi.toml":"bd7cc0e7c1981f53938f429c4f2541ac454ed4160a8a0b4670659e38acd23ee5"},"package":null} {"files":{"Cargo.toml":"d9eb25783f4d9983b705ded68b5fedf39d73257b19bbf688a5c969c49ebd675f","dumps/main/attachments/regions/world":"00b308033d44f61612b962f572765d14a3999586d92fc8b9fff2217a1ae070e8","dumps/main/attachments/regions/world-buffered":"1d3ed6954fac2a5b31302f5d3e8186c5fa08a20239afc0643ca5dfbb4d8a86fc","dumps/main/attachments/regions/world-buffered.meta.json":"914a71376a152036aceccb6877e079fbb9e3373c6219f24f00dd30e901a72cce","dumps/main/attachments/regions/world.meta.json":"2a47d77834997b98e563265d299723e7f7fd64c8c7a5731afc722862333d6fbd","dumps/main/regions.json":"e8990158373f82d3f89fed5089cf29e4177cc85904479128728e05025e9a0c0c","dumps/main/search-config-v2.json":"c33698dd66ed7f9dbbda857cad4f890455189e932e24c0d3b335e3e95b65239f","dumps/main/search-telemetry-v2.json":"140b3d322d6e317d97542725920be9f29c6b1d9c5f224e8c31995dddfec6bf1b","src/cache.rs":"c6179802017b43885136e7d64004890cc13e8c2d4742e04073cf404b578f63db","src/client.rs":"386a8cf39bda555f042ace8454651c912525ba957f947a2e0bf91a731c62687b","src/config.rs":"603c7241483861a8c690464f4b50dd3dc281da7edf8aa522f90f175b85a7fa5f","src/error.rs":"20e40a0229842e12888bc43c4159e078f1d09272a43c51dae87989f76952f93b","src/jexl_filter.rs":"e085f92b0ef9031106cf5d4999dbb19f467494c029f324b25d0098506b37b2e1","src/lib.rs":"890d7f5f5493ea6cfed101dc7cca934522b0de37eafad542123b5cb6ccce7f9e","src/macros.rs":"19735d74b6ce8d1fc21a85c39787a271f09a849a310db16ba36219aba9106736","src/schema.rs":"348e0d5ad1840aaae796b537d21381ef91bd75be262138bfec376d9f88d205b3","src/service.rs":"73da6cecc8c804b8e55d35ea3c71c1dd1e4099ad60532b7b0da153f9cde1eb21","src/signatures.rs":"5946518b69265be9da908097c0e994df24c77a36e5881eb29bb0f4107018279d","src/storage.rs":"5ae489964d82a0305a6b250d92f4c1925cc722e44890c24f681dd97b0258b9f4","uniffi.toml":"bd7cc0e7c1981f53938f429c4f2541ac454ed4160a8a0b4670659e38acd23ee5"},"package":null}

File diff suppressed because it is too large Load Diff

View File

@@ -1,193 +1,5 @@
{ {
"data": [ "data": [
{
"codeParamName": "pc",
"components": [
{
"included": {
"children": [
{
"countChildren": true,
"selector": ".pa_item"
}
],
"parent": {
"selector": ".adsMvCarousel"
},
"related": {
"selector": ".cr"
}
},
"type": "ad_carousel"
},
{
"excluded": {
"parent": {
"selector": "aside"
}
},
"included": {
"children": [
{
"selector": ".b_vlist2col",
"type": "ad_sitelink"
}
],
"parent": {
"selector": ".sb_adTA"
}
},
"type": "ad_link"
},
{
"included": {
"children": [
{
"countChildren": true,
"selector": ".pa_item, .sb_adTA"
}
],
"parent": {
"selector": "aside"
}
},
"type": "ad_sidebar"
},
{
"included": {
"children": [
{
"selector": "input[name='q']"
}
],
"parent": {
"selector": "form#sb_form"
},
"related": {
"selector": "#sw_as"
}
},
"topDown": true,
"type": "incontent_searchbox"
},
{
"included": {
"children": [
{
"eventListeners": [
{
"action": "clicked_accept",
"eventType": "click"
}
],
"selector": "button#bnp_btn_accept"
},
{
"eventListeners": [
{
"action": "clicked_reject",
"eventType": "click"
}
],
"selector": "button#bnp_btn_reject"
},
{
"eventListeners": [
{
"action": "clicked_more_options",
"eventType": "click"
}
],
"selector": "a#bnp_btn_preference"
}
],
"parent": {
"selector": "div#bnp_cookie_banner"
}
},
"topDown": true,
"type": "cookie_banner"
},
{
"default": true,
"type": "ad_link"
}
],
"domainExtraction": {
"ads": [
{
"method": "textContent",
"selectors": "#b_results .b_ad .b_attribution cite, .adsMvCarousel cite, aside cite"
}
],
"nonAds": [
{
"method": "textContent",
"selectors": "#b_results .b_algo .b_attribution cite"
}
]
},
"extraAdServersRegexps": [
"^https://www\\.bing\\.com/acli?c?k"
],
"followOnCookies": [
{
"codeParamName": "PC",
"extraCodeParamName": "form",
"extraCodePrefixes": [
"QBRE"
],
"host": "www.bing.com",
"name": "_SS"
},
{
"codeParamName": "PC",
"extraCodeParamName": "form",
"extraCodePrefixes": [
"QBRE"
],
"host": "www.bing.com",
"name": "SRCHS"
}
],
"id": "e1eec461-f1f3-40de-b94b-3b670b78108c",
"last_modified": 1731429440245,
"nonAdsLinkRegexps": [
"^https://www.bing.com/ck/a"
],
"organicCodes": [],
"queryParamName": "q",
"queryParamNames": [
"q"
],
"schema": 1730764806877,
"searchPageRegexp": "^https://www\\.bing\\.com/search",
"shoppingTab": {
"regexp": "^/shop?",
"selector": "#b-scopeListItem-shop a"
},
"taggedCodes": [
"MOZ2",
"MOZ4",
"MOZ5",
"MOZA",
"MOZB",
"MOZD",
"MOZE",
"MOZI",
"MOZL",
"MOZM",
"MOZO",
"MOZR",
"MOZT",
"MOZW",
"MOZX",
"MZSL01",
"MZSL02",
"MZSL03"
],
"telemetryId": "bing"
},
{ {
"adServerAttributes": [ "adServerAttributes": [
"rw" "rw"
@@ -423,7 +235,7 @@
"ignoreLinkRegexps": [ "ignoreLinkRegexps": [
"^https?://consent\\.google\\.(?:.+)/d\\?continue\\=" "^https?://consent\\.google\\.(?:.+)/d\\?continue\\="
], ],
"last_modified": 1724867833754, "last_modified": 1738595471359,
"nonAdsLinkQueryParamNames": [ "nonAdsLinkQueryParamNames": [
"url" "url"
], ],
@@ -435,7 +247,10 @@
"queryParamNames": [ "queryParamNames": [
"q" "q"
], ],
"schema": 1724630408117, "schema": 1738577315189,
"searchPageMatches": [
"https://{host}/search*"
],
"searchPageRegexp": "^https://www\\.google\\.(?:.+)/search", "searchPageRegexp": "^https://www\\.google\\.(?:.+)/search",
"shoppingTab": { "shoppingTab": {
"inspectRegexpInSERP": true, "inspectRegexpInSERP": true,
@@ -472,32 +287,42 @@
"firefox-b-tinno", "firefox-b-tinno",
"firefox-b-pn-wt", "firefox-b-pn-wt",
"firefox-b-pn-wt-us", "firefox-b-pn-wt-us",
"firefox-b-vv",
"ubuntu", "ubuntu",
"ubuntu-sn" "ubuntu-sn"
], ],
"telemetryId": "google" "telemetryId": "google"
}, },
{ {
"codeParamName": "client", "codeParamName": "tt",
"components": [ "components": [
{ {
"included": { "included": {
"children": [ "children": [
{ {
"countChildren": true, "countChildren": true,
"selector": "[data-slide-index]" "selector": ".product-ads-carousel__item"
} }
], ],
"parent": { "parent": {
"selector": "[data-testid='pam.container']" "selector": ".product-ads-carousel"
},
"related": {
"selector": ".snippet__control"
} }
}, },
"type": "ad_image_row" "type": "ad_carousel"
}, },
{ {
"included": { "included": {
"children": [
{
"selector": ".result__extra-content .deep-links--descriptions",
"type": "ad_sitelink"
}
],
"parent": { "parent": {
"selector": "[data-testid='adResult']" "selector": ".ad-result"
} }
}, },
"type": "ad_link" "type": "ad_link"
@@ -506,14 +331,14 @@
"included": { "included": {
"children": [ "children": [
{ {
"selector": "input[type='search']" "selector": ".search-form__input, .search-form__submit"
} }
], ],
"parent": { "parent": {
"selector": "._1zdrb._1cR1n" "selector": "form.search-form"
}, },
"related": { "related": {
"selector": "#search-suggestions" "selector": ".search-form__suggestions"
} }
}, },
"topDown": true, "topDown": true,
@@ -524,32 +349,65 @@
"type": "ad_link" "type": "ad_link"
} }
], ],
"defaultPageQueryParam": { "expectedOrganicCodes": [],
"key": "t",
"value": "web"
},
"extraAdServersRegexps": [ "extraAdServersRegexps": [
"^https://www\\.bing\\.com/acli?c?k", "^https://www\\.bing\\.com/acli?c?k"
"^https://api\\.qwant\\.com/v3/r/",
"^https://fdn\\.qwant\\.com/v3/r/"
], ],
"filter_expression": "env.version|versionCompare(\"124.0a1\")>=0", "filter_expression": "env.version|versionCompare(\"110.0a1\")>=0",
"followOnParamNames": [], "id": "9a487171-3a06-4647-8866-36250ec84f3a",
"id": "19c434a3-d173-4871-9743-290ac92a3f6b", "last_modified": 1733951403249,
"isSPA": true,
"last_modified": 1713187389066,
"organicCodes": [], "organicCodes": [],
"queryParamName": "q", "queryParamName": "q",
"queryParamNames": [ "queryParamNames": [
"q" "q"
], ],
"schema": 1712762409532, "schema": 1733932318157,
"searchPageRegexp": "^https://www\\.qwant\\.com/", "searchPageMatches": [
"taggedCodes": [ "https://www.ecosia.org/*"
"brz-moz",
"firefoxqwant"
], ],
"telemetryId": "qwant" "searchPageRegexp": "^https://www\\.ecosia\\.org/",
"shoppingTab": {
"regexp": "/shopping?",
"selector": "nav li[data-test-id='search-navigation-item-shopping'] a"
},
"taggedCodes": [
"mzl",
"813cf1dd",
"16eeffc4"
],
"telemetryId": "ecosia"
},
{
"codeParamName": "tn",
"extraAdServersRegexps": [
"^https?://www\\.baidu\\.com/baidu\\.php?"
],
"followOnParamNames": [
"oq"
],
"id": "19c434a3-d173-4871-9743-290ac92a3f6a",
"last_modified": 1733951403246,
"organicCodes": [],
"queryParamName": "wd",
"queryParamNames": [
"wd",
"word"
],
"schema": 1733932317207,
"searchPageMatches": [
"https://m.baidu.com/s*",
"https://m.baidu.com/baidu*",
"https://www.baidu.com/s*",
"https://www.baidu.com/baidu*"
],
"searchPageRegexp": "^https://(?:m|www)\\.baidu\\.com/(?:s|baidu)",
"taggedCodes": [
"monline_dg",
"monline_3_dg",
"monline_4_dg",
"monline_7_dg"
],
"telemetryId": "baidu"
}, },
{ {
"codeParamName": "t", "codeParamName": "t",
@@ -677,13 +535,16 @@
"^https://www\\.amazon\\.(?:[a-z.]{2,24}).*(?:tag=duckduckgo-)" "^https://www\\.amazon\\.(?:[a-z.]{2,24}).*(?:tag=duckduckgo-)"
], ],
"id": "9dfd626b-26f2-4913-9d0a-27db6cb7d8ca", "id": "9dfd626b-26f2-4913-9d0a-27db6cb7d8ca",
"last_modified": 1706198445456, "last_modified": 1733951403244,
"organicCodes": [], "organicCodes": [],
"queryParamName": "q", "queryParamName": "q",
"queryParamNames": [ "queryParamNames": [
"q" "q"
], ],
"schema": 1705363206938, "schema": 1733932316283,
"searchPageMatches": [
"https://duckduckgo.com/*"
],
"searchPageRegexp": "^https://duckduckgo\\.com/", "searchPageRegexp": "^https://duckduckgo\\.com/",
"shoppingTab": { "shoppingTab": {
"regexp": "&iax=shopping&ia=shopping", "regexp": "&iax=shopping&ia=shopping",
@@ -709,61 +570,26 @@
"telemetryId": "duckduckgo" "telemetryId": "duckduckgo"
}, },
{ {
"codeParamName": "tn", "codeParamName": "client",
"extraAdServersRegexps": [
"^https?://www\\.baidu\\.com/baidu\\.php?"
],
"followOnParamNames": [
"oq"
],
"id": "19c434a3-d173-4871-9743-290ac92a3f6a",
"last_modified": 1698666532326,
"organicCodes": [],
"queryParamName": "wd",
"queryParamNames": [
"wd",
"word"
],
"schema": 1698656464939,
"searchPageRegexp": "^https://(?:m|www)\\.baidu\\.com/(?:s|baidu)",
"taggedCodes": [
"monline_dg",
"monline_3_dg",
"monline_4_dg",
"monline_7_dg"
],
"telemetryId": "baidu"
},
{
"codeParamName": "tt",
"components": [ "components": [
{ {
"included": { "included": {
"children": [ "children": [
{ {
"countChildren": true, "countChildren": true,
"selector": ".product-ads-carousel__item" "selector": "[data-slide-index]"
} }
], ],
"parent": { "parent": {
"selector": ".product-ads-carousel" "selector": "[data-testid='pam.container']"
},
"related": {
"selector": ".snippet__control"
} }
}, },
"type": "ad_carousel" "type": "ad_image_row"
}, },
{ {
"included": { "included": {
"children": [
{
"selector": ".result__extra-content .deep-links--descriptions",
"type": "ad_sitelink"
}
],
"parent": { "parent": {
"selector": ".ad-result" "selector": "[data-testid='adResult']"
} }
}, },
"type": "ad_link" "type": "ad_link"
@@ -772,14 +598,14 @@
"included": { "included": {
"children": [ "children": [
{ {
"selector": ".search-form__input, .search-form__submit" "selector": "input[type='search']"
} }
], ],
"parent": { "parent": {
"selector": "form.search-form" "selector": "._1zdrb._1cR1n"
}, },
"related": { "related": {
"selector": ".search-form__suggestions" "selector": "#search-suggestions"
} }
}, },
"topDown": true, "topDown": true,
@@ -790,31 +616,227 @@
"type": "ad_link" "type": "ad_link"
} }
], ],
"expectedOrganicCodes": [], "defaultPageQueryParam": {
"key": "t",
"value": "web"
},
"extraAdServersRegexps": [ "extraAdServersRegexps": [
"^https://www\\.bing\\.com/acli?c?k" "^https://www\\.bing\\.com/acli?c?k",
"^https://api\\.qwant\\.com/v3/r/",
"^https://fdn\\.qwant\\.com/v3/r/"
], ],
"filter_expression": "env.version|versionCompare(\"110.0a1\")>=0", "filter_expression": "env.version|versionCompare(\"124.0a1\")>=0",
"id": "9a487171-3a06-4647-8866-36250ec84f3a", "followOnParamNames": [],
"last_modified": 1698666532324, "id": "19c434a3-d173-4871-9743-290ac92a3f6b",
"isSPA": true,
"last_modified": 1733951403242,
"organicCodes": [], "organicCodes": [],
"queryParamName": "q", "queryParamName": "q",
"queryParamNames": [ "queryParamNames": [
"q" "q"
], ],
"schema": 1698656463945, "schema": 1733932315328,
"searchPageRegexp": "^https://www\\.ecosia\\.org/", "searchPageMatches": [
"https://www.qwant.com/*"
],
"searchPageRegexp": "^https://www\\.qwant\\.com/",
"taggedCodes": [
"brz-moz",
"firefoxqwant"
],
"telemetryId": "qwant"
},
{
"codeParamName": "pc",
"components": [
{
"included": {
"children": [
{
"countChildren": true,
"selector": ".pa_item"
}
],
"parent": {
"selector": ".adsMvCarousel"
},
"related": {
"selector": ".cr"
}
},
"type": "ad_carousel"
},
{
"excluded": {
"parent": {
"selector": "aside"
}
},
"included": {
"children": [
{
"selector": ".b_vlist2col",
"type": "ad_sitelink"
}
],
"parent": {
"selector": ".sb_adTA"
}
},
"type": "ad_link"
},
{
"included": {
"children": [
{
"countChildren": true,
"selector": ".pa_item, .sb_adTA"
}
],
"parent": {
"selector": "aside"
}
},
"type": "ad_sidebar"
},
{
"included": {
"children": [
{
"selector": "input[name='q']"
}
],
"parent": {
"selector": "form#sb_form"
},
"related": {
"selector": "#sw_as"
}
},
"topDown": true,
"type": "incontent_searchbox"
},
{
"included": {
"children": [
{
"eventListeners": [
{
"action": "clicked_accept",
"eventType": "click"
}
],
"selector": "button#bnp_btn_accept"
},
{
"eventListeners": [
{
"action": "clicked_reject",
"eventType": "click"
}
],
"selector": "button#bnp_btn_reject"
},
{
"eventListeners": [
{
"action": "clicked_more_options",
"eventType": "click"
}
],
"selector": "a#bnp_btn_preference"
}
],
"parent": {
"selector": "div#bnp_cookie_banner"
}
},
"topDown": true,
"type": "cookie_banner"
},
{
"default": true,
"type": "ad_link"
}
],
"domainExtraction": {
"ads": [
{
"method": "textContent",
"selectors": "#b_results .b_ad .b_attribution cite, .adsMvCarousel cite, aside cite"
}
],
"nonAds": [
{
"method": "textContent",
"selectors": "#b_results .b_algo .b_attribution cite"
}
]
},
"extraAdServersRegexps": [
"^https://www\\.bing\\.com/acli?c?k"
],
"followOnCookies": [
{
"codeParamName": "PC",
"extraCodeParamName": "form",
"extraCodePrefixes": [
"QBRE"
],
"host": "www.bing.com",
"name": "_SS"
},
{
"codeParamName": "PC",
"extraCodeParamName": "form",
"extraCodePrefixes": [
"QBRE"
],
"host": "www.bing.com",
"name": "SRCHS"
}
],
"id": "e1eec461-f1f3-40de-b94b-3b670b78108c",
"last_modified": 1733951403237,
"nonAdsLinkRegexps": [
"^https://www.bing.com/ck/a"
],
"organicCodes": [],
"queryParamName": "q",
"queryParamNames": [
"q"
],
"schema": 1733820446478,
"searchPageMatches": [
"https://www.bing.com/search*"
],
"searchPageRegexp": "^https://www\\.bing\\.com/search",
"shoppingTab": { "shoppingTab": {
"regexp": "/shopping?", "regexp": "^/shop?",
"selector": "nav li[data-test-id='search-navigation-item-shopping'] a" "selector": "#b-scopeListItem-shop a"
}, },
"taggedCodes": [ "taggedCodes": [
"mzl", "MOZ2",
"813cf1dd", "MOZ4",
"16eeffc4" "MOZ5",
"MOZA",
"MOZB",
"MOZD",
"MOZE",
"MOZI",
"MOZL",
"MOZM",
"MOZO",
"MOZR",
"MOZT",
"MOZW",
"MOZX",
"MZSL01",
"MZSL02",
"MZSL03"
], ],
"telemetryId": "ecosia" "telemetryId": "bing"
} }
], ],
"timestamp": 1731429440245 "timestamp": 1738595471359
} }

View File

@@ -74,20 +74,24 @@ struct CollectionData {
pub struct RemoteSettingsClient<C = ViaductApiClient> { pub struct RemoteSettingsClient<C = ViaductApiClient> {
// This is immutable, so it can be outside the mutex // This is immutable, so it can be outside the mutex
collection_name: String, collection_name: String,
#[cfg(feature = "jexl")]
jexl_filter: JexlFilter,
inner: Mutex<RemoteSettingsClientInner<C>>, inner: Mutex<RemoteSettingsClientInner<C>>,
} }
struct RemoteSettingsClientInner<C> { struct RemoteSettingsClientInner<C> {
storage: Storage, storage: Storage,
api_client: C, api_client: C,
#[cfg(feature = "jexl")]
jexl_filter: JexlFilter,
} }
// Add your local packaged data you want to work with here // Add your local packaged data you want to work with here
//
// To download the dump, run:
// $ cargo remote-settings dump-get --bucket main --collection-name <collection name>
impl<C: ApiClient> RemoteSettingsClient<C> { impl<C: ApiClient> RemoteSettingsClient<C> {
// One line per bucket + collection // One line per bucket + collection
packaged_collections! { packaged_collections! {
("main", "search-config-v2"),
("main", "search-telemetry-v2"), ("main", "search-telemetry-v2"),
("main", "regions"), ("main", "regions"),
} }
@@ -119,11 +123,11 @@ impl<C: ApiClient> RemoteSettingsClient<C> {
) -> Self { ) -> Self {
Self { Self {
collection_name, collection_name,
#[cfg(feature = "jexl")]
jexl_filter,
inner: Mutex::new(RemoteSettingsClientInner { inner: Mutex::new(RemoteSettingsClientInner {
storage, storage,
api_client, api_client,
#[cfg(feature = "jexl")]
jexl_filter,
}), }),
} }
} }
@@ -145,12 +149,16 @@ impl<C: ApiClient> RemoteSettingsClient<C> {
/// Filters records based on the presence and evaluation of `filter_expression`. /// Filters records based on the presence and evaluation of `filter_expression`.
#[cfg(feature = "jexl")] #[cfg(feature = "jexl")]
fn filter_records(&self, records: Vec<RemoteSettingsRecord>) -> Vec<RemoteSettingsRecord> { fn filter_records(
&self,
records: Vec<RemoteSettingsRecord>,
inner: &RemoteSettingsClientInner<C>,
) -> Vec<RemoteSettingsRecord> {
records records
.into_iter() .into_iter()
.filter(|record| match record.fields.get("filter_expression") { .filter(|record| match record.fields.get("filter_expression") {
Some(serde_json::Value::String(filter_expr)) => { Some(serde_json::Value::String(filter_expr)) => {
self.jexl_filter.evaluate(filter_expr).unwrap_or(false) inner.jexl_filter.evaluate(filter_expr).unwrap_or(false)
} }
_ => true, // Include records without a valid filter expression by default _ => true, // Include records without a valid filter expression by default
}) })
@@ -158,7 +166,11 @@ impl<C: ApiClient> RemoteSettingsClient<C> {
} }
#[cfg(not(feature = "jexl"))] #[cfg(not(feature = "jexl"))]
fn filter_records(&self, records: Vec<RemoteSettingsRecord>) -> Vec<RemoteSettingsRecord> { fn filter_records(
&self,
records: Vec<RemoteSettingsRecord>,
_inner: &RemoteSettingsClientInner<C>,
) -> Vec<RemoteSettingsRecord> {
records records
} }
@@ -195,7 +207,7 @@ impl<C: ApiClient> RemoteSettingsClient<C> {
packaged_data.timestamp, packaged_data.timestamp,
CollectionMetadata::default(), CollectionMetadata::default(),
)?; )?;
return Ok(Some(self.filter_records(packaged_data.data))); return Ok(Some(self.filter_records(packaged_data.data, &inner)));
} }
} }
@@ -206,7 +218,7 @@ impl<C: ApiClient> RemoteSettingsClient<C> {
// //
// Note: we should return these even if it's an empty list and `sync_if_empty=true`. // Note: we should return these even if it's an empty list and `sync_if_empty=true`.
// The "if empty" part refers to the cache being empty, not the list. // The "if empty" part refers to the cache being empty, not the list.
(Some(cached_records), _) => Some(self.filter_records(cached_records)), (Some(cached_records), _) => Some(self.filter_records(cached_records, &inner)),
// Case 3: sync_if_empty=true // Case 3: sync_if_empty=true
(None, true) => { (None, true) => {
let changeset = inner.api_client.fetch_changeset(None)?; let changeset = inner.api_client.fetch_changeset(None)?;
@@ -216,7 +228,7 @@ impl<C: ApiClient> RemoteSettingsClient<C> {
changeset.timestamp, changeset.timestamp,
changeset.metadata, changeset.metadata,
)?; )?;
Some(self.filter_records(changeset.changes)) Some(self.filter_records(changeset.changes, &inner))
} }
// Case 4: Nothing to return // Case 4: Nothing to return
(None, false) => None, (None, false) => None,
@@ -360,9 +372,10 @@ impl<C: ApiClient> RemoteSettingsClient<C> {
/// Downloads an attachment from [attachment_location]. NOTE: there are no guarantees about a /// Downloads an attachment from [attachment_location]. NOTE: there are no guarantees about a
/// maximum size, so use care when fetching potentially large attachments. /// maximum size, so use care when fetching potentially large attachments.
pub fn get_attachment(&self, record: RemoteSettingsRecord) -> Result<Vec<u8>> { pub fn get_attachment(&self, record: &RemoteSettingsRecord) -> Result<Vec<u8>> {
let metadata = record let metadata = record
.attachment .attachment
.as_ref()
.ok_or_else(|| Error::RecordAttachmentMismatchError("No attachment metadata".into()))?; .ok_or_else(|| Error::RecordAttachmentMismatchError("No attachment metadata".into()))?;
let mut inner = self.inner.lock(); let mut inner = self.inner.lock();
@@ -2415,7 +2428,7 @@ mod test_packaged_metadata {
fields: serde_json::json!({}).as_object().unwrap().clone(), fields: serde_json::json!({}).as_object().unwrap().clone(),
}; };
let attachment_data = rs_client.get_attachment(record)?; let attachment_data = rs_client.get_attachment(&record)?;
// Verify we got the expected data // Verify we got the expected data
let expected_data = std::fs::read(file_path)?; let expected_data = std::fs::read(file_path)?;
@@ -2471,7 +2484,7 @@ mod test_packaged_metadata {
fields: serde_json::json!({}).as_object().unwrap().clone(), fields: serde_json::json!({}).as_object().unwrap().clone(),
}; };
let attachment_data = rs_client.get_attachment(record)?; let attachment_data = rs_client.get_attachment(&record)?;
// Verify we got the mock API data, not the packaged data // Verify we got the mock API data, not the packaged data
assert_eq!(attachment_data, vec![1, 2, 3, 4, 5]); assert_eq!(attachment_data, vec![1, 2, 3, 4, 5]);

View File

@@ -10,7 +10,7 @@
use url::Url; use url::Url;
use crate::{ApiResult, Error, Result}; use crate::{ApiResult, Error, RemoteSettingsContext, Result};
/// Remote settings configuration /// Remote settings configuration
/// ///
@@ -25,6 +25,9 @@ pub struct RemoteSettingsConfig2 {
/// Bucket name to use, defaults to "main". Use "main-preview" for a preview bucket /// Bucket name to use, defaults to "main". Use "main-preview" for a preview bucket
#[uniffi(default = None)] #[uniffi(default = None)]
pub bucket_name: Option<String>, pub bucket_name: Option<String>,
/// App context to use for JEXL filtering (when the `jexl` feature is present).
#[uniffi(default = None)]
pub app_context: Option<RemoteSettingsContext>,
} }
/// Custom configuration for the client. /// Custom configuration for the client.

View File

@@ -103,12 +103,8 @@ impl RemoteSettingsService {
/// Create a new Remote Settings client /// Create a new Remote Settings client
#[handle_error(Error)] #[handle_error(Error)]
pub fn make_client( pub fn make_client(&self, collection_name: String) -> ApiResult<Arc<RemoteSettingsClient>> {
&self, self.internal.make_client(collection_name)
collection_name: String,
app_context: Option<RemoteSettingsContext>,
) -> ApiResult<Arc<RemoteSettingsClient>> {
self.internal.make_client(collection_name, app_context)
} }
/// Sync collections for all active clients /// Sync collections for all active clients
@@ -200,7 +196,7 @@ impl RemoteSettingsClient {
/// - This method will throw if there is a network or other error when fetching the /// - This method will throw if there is a network or other error when fetching the
/// attachment data. /// attachment data.
#[handle_error(Error)] #[handle_error(Error)]
pub fn get_attachment(&self, record: RemoteSettingsRecord) -> ApiResult<Vec<u8>> { pub fn get_attachment(&self, record: &RemoteSettingsRecord) -> ApiResult<Vec<u8>> {
self.internal.get_attachment(record) self.internal.get_attachment(record)
} }
} }
@@ -212,7 +208,7 @@ impl RemoteSettingsClient {
base_url: Url, base_url: Url,
bucket_name: String, bucket_name: String,
collection_name: String, collection_name: String,
#[cfg(feature = "jexl")] context: Option<RemoteSettingsContext>, #[allow(unused)] context: Option<RemoteSettingsContext>,
storage: Storage, storage: Storage,
) -> Result<Self> { ) -> Result<Self> {
Ok(Self { Ok(Self {

View File

@@ -25,6 +25,7 @@ struct RemoteSettingsServiceInner {
storage_dir: Utf8PathBuf, storage_dir: Utf8PathBuf,
base_url: Url, base_url: Url,
bucket_name: String, bucket_name: String,
app_context: Option<RemoteSettingsContext>,
/// Weakrefs for all clients that we've created. Note: this stores the /// Weakrefs for all clients that we've created. Note: this stores the
/// top-level/public `RemoteSettingsClient` structs rather than `client::RemoteSettingsClient`. /// top-level/public `RemoteSettingsClient` structs rather than `client::RemoteSettingsClient`.
/// The reason for this is that we return Arcs to the public struct to the foreign code, so we /// The reason for this is that we return Arcs to the public struct to the foreign code, so we
@@ -50,44 +51,26 @@ impl RemoteSettingsService {
storage_dir, storage_dir,
base_url, base_url,
bucket_name, bucket_name,
app_context: config.app_context,
clients: vec![], clients: vec![],
}), }),
}) })
} }
/// Create a new Remote Settings client pub fn make_client(&self, collection_name: String) -> Result<Arc<RemoteSettingsClient>> {
#[cfg(feature = "jexl")]
pub fn make_client(
&self,
collection_name: String,
context: Option<RemoteSettingsContext>,
) -> Result<Arc<RemoteSettingsClient>> {
let mut inner = self.inner.lock(); let mut inner = self.inner.lock();
let storage = Storage::new(inner.storage_dir.join(format!("{collection_name}.sql")))?; // Allow using in-memory databases for testing of external crates.
let storage = if inner.storage_dir == ":memory:" {
Storage::new(inner.storage_dir.clone())?
} else {
Storage::new(inner.storage_dir.join(format!("{collection_name}.sql")))?
};
let client = Arc::new(RemoteSettingsClient::new( let client = Arc::new(RemoteSettingsClient::new(
inner.base_url.clone(), inner.base_url.clone(),
inner.bucket_name.clone(), inner.bucket_name.clone(),
collection_name.clone(), collection_name.clone(),
context, inner.app_context.clone(),
storage,
)?);
inner.clients.push(Arc::downgrade(&client));
Ok(client)
}
#[cfg(not(feature = "jexl"))]
pub fn make_client(
&self,
collection_name: String,
#[allow(unused_variables)] context: Option<RemoteSettingsContext>,
) -> Result<Arc<RemoteSettingsClient>> {
let mut inner = self.inner.lock();
let storage = Storage::new(inner.storage_dir.join(format!("{collection_name}.sql")))?;
let client = Arc::new(RemoteSettingsClient::new(
inner.base_url.clone(),
inner.bucket_name.clone(),
collection_name.clone(),
storage, storage,
)?); )?);
inner.clients.push(Arc::downgrade(&client)); inner.clients.push(Arc::downgrade(&client));

View File

@@ -1 +1 @@
{"files":{"Cargo.toml":"e8570748e6310258918c53e60e9a3b5bdbe8cf14ccbb2763226d5b618e6dc110","README.md":"d59a6ad6232a86a7bd3632ca62c44ba8bd466615c5d47ce0d836b270bac5562c","src/configuration_types.rs":"db9855ca3693602da8d4e1ced9a45107d41f1908c5630010e56dd2e7a68b5cc5","src/environment_matching.rs":"5a1ade9a900942c62e8740597528a34df6fb3fdb72c801a647a3386acd42fcc8","src/error.rs":"d39a2ea9e5c786ef2e1b690a006317cade874c86880768beef713ed86d4e5858","src/filter.rs":"f0ce7d24cb4f371111b8e3356e9a9c9bdd799f3f9dd6da615ad83ed815a70a88","src/lib.rs":"b5993002d8d1053c8524aa2025054697dc5fe3525815a7effeefffc72b83a08d","src/selector.rs":"174ec396fc29e0f1bf5bb1dd52df6141d3795a3cefe0f9a2c31b454bf4f5e566","src/types.rs":"950578304a34cbb3a5ad81e15aab4d9ab6a927d5a451bc98be3d5c72b58507d4"},"package":null} {"files":{"Cargo.toml":"2794ef52bbf75b7abc5cebb1d301103be984a7dcd0f90be0bf3e675aae5c3cee","README.md":"d59a6ad6232a86a7bd3632ca62c44ba8bd466615c5d47ce0d836b270bac5562c","src/configuration_types.rs":"baea920438a87499791b33177c28b690356da24be13223f9113f40e43cb787d4","src/environment_matching.rs":"5a1ade9a900942c62e8740597528a34df6fb3fdb72c801a647a3386acd42fcc8","src/error.rs":"d4da34f51a6d229ffe707acce0aa8a87384de37fd1ec20f121026b077cc9169c","src/filter.rs":"34ca0fdc311f002a6134f896aa040870780f91ad626a129429c2e840b9b1ed7a","src/lib.rs":"eb0102461edbcf2425e2f46c1677a52634d1c001480d1c6694dc3c8add39a350","src/selector.rs":"456c9bcea4643d19347c62a75e2a2770d6158c008ebc2b66f8a550df0d0b5d97","src/sort_helpers.rs":"12d41c34fc2ca5387edc248189335fb11702618b7253f8b486f0c84576084faa","src/types.rs":"c35e70ed9bed63636aa7f6cb4bdc5898c9f3a3f7382a8d6d13aa008ee597d6af"},"package":null}

View File

@@ -23,6 +23,9 @@ description = "Library for search service related components."
readme = "README.md" readme = "README.md"
license = "MPL-2.0" license = "MPL-2.0"
[features]
enable_env_logger = ["env_logger"]
[lib] [lib]
name = "search" name = "search"
path = "src/lib.rs" path = "src/lib.rs"
@@ -32,12 +35,20 @@ parking_lot = ">=0.11,<=0.12"
serde_json = "1" serde_json = "1"
thiserror = "1" thiserror = "1"
[dependencies.env_logger]
version = "0.10.0"
optional = true
default-features = false
[dependencies.error-support] [dependencies.error-support]
path = "../support/error" path = "../support/error"
[dependencies.firefox-versioning] [dependencies.firefox-versioning]
path = "../support/firefox-versioning" path = "../support/firefox-versioning"
[dependencies.remote_settings]
path = "../remote_settings"
[dependencies.serde] [dependencies.serde]
version = "1" version = "1"
features = ["derive"] features = ["derive"]
@@ -46,9 +57,18 @@ features = ["derive"]
version = "0.28.2" version = "0.28.2"
[dev-dependencies] [dev-dependencies]
mockito = "0.31"
once_cell = "1.18.0" once_cell = "1.18.0"
pretty_assertions = "0.6" pretty_assertions = "0.6"
[dev-dependencies.env_logger]
version = "0.10.0"
features = ["humantime"]
default-features = false
[dev-dependencies.viaduct-reqwest]
path = "../support/viaduct-reqwest"
[build-dependencies.uniffi] [build-dependencies.uniffi]
version = "0.28.2" version = "0.28.2"
features = ["build"] features = ["build"]

View File

@@ -59,13 +59,16 @@ pub(crate) struct JSONEngineUrl {
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub(crate) struct JSONEngineUrls { pub(crate) struct JSONEngineUrls {
/// The URL to use for searches. /// The URL to use for searches.
pub search: JSONEngineUrl, pub search: Option<JSONEngineUrl>,
/// The URL to use for suggestions. /// The URL to use for suggestions.
pub suggestions: Option<JSONEngineUrl>, pub suggestions: Option<JSONEngineUrl>,
/// The URL to use for trending suggestions. /// The URL to use for trending suggestions.
pub trending: Option<JSONEngineUrl>, pub trending: Option<JSONEngineUrl>,
/// The URL of the search engine homepage.
pub search_form: Option<JSONEngineUrl>,
} }
/// Represents the engine base section of the configuration. /// Represents the engine base section of the configuration.
@@ -81,6 +84,7 @@ pub(crate) struct JSONEngineBase {
/// The classification of search engine according to the main search types /// The classification of search engine according to the main search types
/// (e.g. general, shopping, travel, dictionary). Currently, only marking as /// (e.g. general, shopping, travel, dictionary). Currently, only marking as
/// a general search engine is supported. /// a general search engine is supported.
#[serde(default)]
pub classification: SearchEngineClassification, pub classification: SearchEngineClassification,
/// The user visible name for the search engine. /// The user visible name for the search engine.
@@ -182,6 +186,15 @@ pub(crate) struct JSONEngineVariant {
/// The urls for this variant. /// The urls for this variant.
pub urls: Option<JSONEngineUrls>, pub urls: Option<JSONEngineUrls>,
/// This section describes subvariations of this search engine that may occur
/// depending on the user's environment. The last subvariant that matches
/// the user's environment will be applied to the engine.
///
/// Note: sub-variants are only supported in a top-level variant. You cannot
/// have nested sub-variants.
#[serde(default)]
pub sub_variants: Vec<JSONEngineVariant>,
} }
/// Represents an individual engine record in the configuration. /// Represents an individual engine record in the configuration.
@@ -240,11 +253,28 @@ pub(crate) struct JSONDefaultEnginesRecord {
pub specific_defaults: Vec<JSONSpecificDefaultRecord>, pub specific_defaults: Vec<JSONSpecificDefaultRecord>,
} }
#[derive(Debug, Deserialize, Clone)]
#[serde(rename_all = "camelCase")]
pub(crate) struct JSONEngineOrder {
/// The specific environment to match for this record.
pub environment: JSONVariantEnvironment,
/// The order of engine identifiers for the associated environment. If engines
/// are present for the user but not included in this list, they will follow
/// after the ones in this list in alphabetical order. If an individual entry
/// is suffixed with a star, matching is applied on a "starts with" basis.
#[serde(default)]
pub order: Vec<String>,
}
/// Represents the engine orders record. /// Represents the engine orders record.
#[derive(Debug, Deserialize, Clone)] #[derive(Debug, Deserialize, Clone)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub(crate) struct JSONEngineOrdersRecord { pub(crate) struct JSONEngineOrdersRecord {
// TODO: Implementation. /// When a user's instance matches the defined environments, the associated
/// engine order will be applied. The array is ordered, when multiple entries
/// match on environments, the later entry will override earlier entries.
pub orders: Vec<JSONEngineOrder>,
} }
/// Represents an individual record in the raw search configuration. /// Represents an individual record in the raw search configuration.

View File

@@ -8,6 +8,8 @@
/// exposed to your application, which should handle them as needed. /// exposed to your application, which should handle them as needed.
use error_support::{ErrorHandling, GetErrorHandling}; use error_support::{ErrorHandling, GetErrorHandling};
use remote_settings::RemoteSettingsError;
/// A list of errors that are internal to the component. This is the error /// A list of errors that are internal to the component. This is the error
/// type for private and crate-internal methods, and is never returned to the /// type for private and crate-internal methods, and is never returned to the
/// application. /// application.
@@ -15,8 +17,12 @@ use error_support::{ErrorHandling, GetErrorHandling};
pub enum Error { pub enum Error {
#[error("Search configuration not specified")] #[error("Search configuration not specified")]
SearchConfigNotSpecified, SearchConfigNotSpecified,
#[error("No records received from remote settings")]
SearchConfigNoRecords,
#[error("JSON error: {0}")] #[error("JSON error: {0}")]
Json(#[from] serde_json::Error), Json(#[from] serde_json::Error),
#[error("Remote Settings error: {0}")]
RemoteSettings(#[from] RemoteSettingsError),
} }
// #[non_exhaustive] // #[non_exhaustive]

View File

@@ -10,6 +10,8 @@ use crate::{
JSONEngineUrls, JSONEngineVariant, JSONSearchConfigurationRecords, RefinedSearchConfig, JSONEngineUrls, JSONEngineVariant, JSONSearchConfigurationRecords, RefinedSearchConfig,
SearchEngineDefinition, SearchEngineUrl, SearchEngineUrls, SearchUserEnvironment, SearchEngineDefinition, SearchEngineUrl, SearchEngineUrls, SearchUserEnvironment,
}; };
use crate::{sort_helpers, JSONEngineOrdersRecord};
use remote_settings::RemoteSettingsRecord;
impl From<JSONEngineUrl> for SearchEngineUrl { impl From<JSONEngineUrl> for SearchEngineUrl {
fn from(url: JSONEngineUrl) -> Self { fn from(url: JSONEngineUrl) -> Self {
@@ -22,17 +24,19 @@ impl From<JSONEngineUrl> for SearchEngineUrl {
} }
} }
impl JSONEngineUrl { impl SearchEngineUrl {
/// Merges two `JSONEngineUrl` objects, preferring the values from the fn merge(&mut self, preferred: &JSONEngineUrl) {
/// `preferred` object. if let Some(base) = &preferred.base {
fn merge(original: Self, preferred: Self) -> Self { self.base = base.clone();
Self { }
base: preferred.base.or(original.base), if let Some(method) = &preferred.method {
method: preferred.method.or(original.method), self.method = method.as_str().to_string();
params: preferred.params.or(original.params), }
search_term_param_name: preferred if let Some(params) = &preferred.params {
.search_term_param_name self.params = params.clone();
.or(original.search_term_param_name), }
if let Some(search_term_param_name) = &preferred.search_term_param_name {
self.search_term_param_name = Some(search_term_param_name.clone());
} }
} }
} }
@@ -40,53 +44,63 @@ impl JSONEngineUrl {
impl From<JSONEngineUrls> for SearchEngineUrls { impl From<JSONEngineUrls> for SearchEngineUrls {
fn from(urls: JSONEngineUrls) -> Self { fn from(urls: JSONEngineUrls) -> Self {
Self { Self {
search: urls.search.into(), search: urls.search.unwrap_or_default().into(),
suggestions: urls.suggestions.map(|suggestions| suggestions.into()), suggestions: urls.suggestions.map(|suggestions| suggestions.into()),
trending: urls.trending.map(|trending| trending.into()), trending: urls.trending.map(|trending| trending.into()),
search_form: urls.search_form.map(|search_form| search_form.into()),
} }
} }
} }
impl JSONEngineUrls { impl SearchEngineUrls {
fn maybe_merge_urls( fn merge(&mut self, preferred: &JSONEngineUrls) {
original_url: Option<JSONEngineUrl>, if let Some(search_url) = &preferred.search {
preferred_url: Option<JSONEngineUrl>, self.search.merge(search_url);
) -> Option<JSONEngineUrl> {
match (&original_url, &preferred_url) {
(Some(original), Some(preferred)) => {
Some(JSONEngineUrl::merge(original.clone(), preferred.clone()))
}
(None, Some(preferred)) => Some(preferred.clone()),
_ => original_url.clone(),
} }
} if let Some(suggestions_url) = &preferred.suggestions {
match &mut self.suggestions {
/// Merges two `JSONEngineUrl` objects, preferring the values from the Some(suggestion) => suggestion.merge(suggestions_url),
/// `preferred` object. None => self.suggestions = Some(suggestions_url.clone().into()),
fn merge(original: Self, preferred: JSONEngineUrls) -> Self { };
Self { }
search: JSONEngineUrl::merge(original.search, preferred.search), if let Some(trending_url) = &preferred.trending {
suggestions: JSONEngineUrls::maybe_merge_urls( match &mut self.trending {
original.suggestions, Some(trend) => trend.merge(trending_url),
preferred.suggestions, None => self.trending = Some(trending_url.clone().into()),
), };
trending: JSONEngineUrls::maybe_merge_urls(original.trending, preferred.trending), }
if let Some(search_form_url) = &preferred.search_form {
match &mut self.search_form {
Some(search_form) => search_form.merge(search_form_url),
None => self.search_form = Some(search_form_url.clone().into()),
};
} }
} }
} }
impl SearchEngineDefinition { impl SearchEngineDefinition {
fn merge_variant(&mut self, variant: &JSONEngineVariant) {
if !self.optional {
self.optional = variant.optional;
}
if let Some(partner_code) = &variant.partner_code {
self.partner_code = partner_code.clone();
}
if let Some(telemetry_suffix) = &variant.telemetry_suffix {
self.telemetry_suffix = telemetry_suffix.clone();
}
if let Some(urls) = &variant.urls {
self.urls.merge(urls);
}
}
pub(crate) fn from_configuration_details( pub(crate) fn from_configuration_details(
identifier: &str, identifier: &str,
base: JSONEngineBase, base: JSONEngineBase,
variant: JSONEngineVariant, variant: &JSONEngineVariant,
sub_variant: &Option<JSONEngineVariant>,
) -> SearchEngineDefinition { ) -> SearchEngineDefinition {
let urls: JSONEngineUrls = match variant.urls { let mut engine_definition = SearchEngineDefinition {
Some(urls) => JSONEngineUrls::merge(base.urls, urls),
None => base.urls,
};
SearchEngineDefinition {
aliases: base.aliases.unwrap_or_default(), aliases: base.aliases.unwrap_or_default(),
charset: base.charset.unwrap_or_else(|| "UTF-8".to_string()), charset: base.charset.unwrap_or_else(|| "UTF-8".to_string()),
classification: base.classification, classification: base.classification,
@@ -94,54 +108,154 @@ impl SearchEngineDefinition {
name: base.name, name: base.name,
optional: variant.optional, optional: variant.optional,
order_hint: None, order_hint: None,
partner_code: variant partner_code: base.partner_code.unwrap_or_default(),
.partner_code telemetry_suffix: String::new(),
.or(base.partner_code) urls: base.urls.into(),
.unwrap_or_default(), };
telemetry_suffix: variant.telemetry_suffix,
urls: urls.into(), engine_definition.merge_variant(variant);
if let Some(sub_variant) = sub_variant {
engine_definition.merge_variant(sub_variant);
} }
engine_definition
} }
} }
pub(crate) fn filter_engine_configuration( pub(crate) struct FilterRecordsResult {
user_environment: SearchUserEnvironment, engines: Vec<SearchEngineDefinition>,
configuration: Vec<JSONSearchConfigurationRecords>, default_engines_record: Option<JSONDefaultEnginesRecord>,
) -> Result<RefinedSearchConfig, Error> { engine_orders_record: Option<JSONEngineOrdersRecord>,
let mut engines = Vec::new(); }
pub(crate) trait Filter {
fn filter_records(
&self,
user_environment: &SearchUserEnvironment,
) -> Result<FilterRecordsResult, Error>;
}
impl Filter for Vec<RemoteSettingsRecord> {
fn filter_records(
&self,
user_environment: &SearchUserEnvironment,
) -> Result<FilterRecordsResult, Error> {
let mut engines = Vec::new();
let mut default_engines_record = None;
let mut engine_orders_record = None;
for record in self {
// TODO: Bug 1947241 - Find a way to avoid having to serialise the records
// back to strings and then deserilise them into the records that we want.
let stringified = serde_json::to_string(&record.fields)?;
match record.fields.get("recordType") {
Some(val) if *val == "engine" => {
let engine_config: Option<JSONEngineRecord> =
serde_json::from_str(&stringified)?;
if let Some(engine_config) = engine_config {
let result =
maybe_extract_engine_config(user_environment, Box::new(engine_config));
engines.extend(result);
}
}
Some(val) if *val == "defaultEngines" => {
default_engines_record = serde_json::from_str(&stringified)?;
}
Some(val) if *val == "engineOrders" => {
engine_orders_record = serde_json::from_str(&stringified)?;
}
// These cases are acceptable - we expect the potential for new
// record types/options so that we can be flexible.
Some(_val) => {}
None => {}
}
}
Ok(FilterRecordsResult {
engines,
default_engines_record,
engine_orders_record,
})
}
}
impl Filter for Vec<JSONSearchConfigurationRecords> {
fn filter_records(
&self,
user_environment: &SearchUserEnvironment,
) -> Result<FilterRecordsResult, Error> {
let mut engines = Vec::new();
let mut default_engines_record = None;
let mut engine_orders_record = None;
for record in self {
match record {
JSONSearchConfigurationRecords::Engine(engine) => {
let result = maybe_extract_engine_config(user_environment, engine.clone());
engines.extend(result);
}
JSONSearchConfigurationRecords::DefaultEngines(default_engines) => {
default_engines_record = Some(default_engines);
}
JSONSearchConfigurationRecords::EngineOrders(engine_orders) => {
engine_orders_record = Some(engine_orders)
}
JSONSearchConfigurationRecords::Unknown => {
// Prevents panics if a new record type is added in future.
}
}
}
Ok(FilterRecordsResult {
engines,
default_engines_record: default_engines_record.cloned(),
engine_orders_record: engine_orders_record.cloned(),
})
}
}
pub(crate) fn filter_engine_configuration_impl(
user_environment: SearchUserEnvironment,
configuration: &impl Filter,
) -> Result<RefinedSearchConfig, Error> {
let mut user_environment = user_environment.clone(); let mut user_environment = user_environment.clone();
user_environment.locale = user_environment.locale.to_lowercase(); user_environment.locale = user_environment.locale.to_lowercase();
user_environment.region = user_environment.region.to_lowercase(); user_environment.region = user_environment.region.to_lowercase();
user_environment.version = user_environment.version.to_lowercase(); user_environment.version = user_environment.version.to_lowercase();
let mut default_engines_record = None; let filtered_result = configuration.filter_records(&user_environment);
for record in configuration { filtered_result.map(|result| {
match record { let (default_engine_id, default_private_engine_id) = determine_default_engines(
JSONSearchConfigurationRecords::Engine(engine) => { &result.engines,
let result = maybe_extract_engine_config(&user_environment, engine); result.default_engines_record,
engines.extend(result); &user_environment,
} );
JSONSearchConfigurationRecords::DefaultEngines(default_engines) => {
default_engines_record = Some(default_engines); let mut engines = result.engines.clone();
}
JSONSearchConfigurationRecords::EngineOrders(_engine_orders) => { if let Some(orders_record) = result.engine_orders_record {
// TODO: Implementation. for order_data in &orders_record.orders {
} if matches_user_environment(&order_data.environment, &user_environment) {
JSONSearchConfigurationRecords::Unknown => { sort_helpers::set_engine_order(&mut engines, &order_data.order);
// Prevents panics if a new record type is added in future. }
} }
} }
}
let (default_engine_id, default_private_engine_id) = engines.sort_by(|a, b| {
determine_default_engines(&engines, default_engines_record, &user_environment); sort_helpers::sort(
default_engine_id.as_ref(),
default_private_engine_id.as_ref(),
a,
b,
)
});
Ok(RefinedSearchConfig { RefinedSearchConfig {
engines, engines,
app_default_engine_id: default_engine_id, app_default_engine_id: default_engine_id,
app_private_default_engine_id: default_private_engine_id, app_private_default_engine_id: default_private_engine_id,
}
}) })
} }
@@ -159,8 +273,23 @@ fn maybe_extract_engine_config(
.rev() .rev()
.find(|r| matches_user_environment(&r.environment, user_environment)); .find(|r| matches_user_environment(&r.environment, user_environment));
let mut matching_sub_variant = None;
if let Some(variant) = &matching_variant {
matching_sub_variant = variant
.sub_variants
.iter()
.rev()
.find(|r| matches_user_environment(&r.environment, user_environment))
.cloned();
}
matching_variant.map(|variant| { matching_variant.map(|variant| {
SearchEngineDefinition::from_configuration_details(&identifier, base, variant) SearchEngineDefinition::from_configuration_details(
&identifier,
base,
&variant,
&matching_sub_variant,
)
}) })
} }
@@ -184,11 +313,13 @@ fn determine_default_engines(
if let Some(specific_default) = specific_default { if let Some(specific_default) = specific_default {
// Check the engine is present in the list of engines before // Check the engine is present in the list of engines before
// we return it as default. // we return it as default.
if let Some(engine_id) = find_engine_with_match(engines, specific_default.default) { if let Some(engine_id) =
find_engine_id_with_match(engines, specific_default.default)
{
default_engine_id.replace(engine_id); default_engine_id.replace(engine_id);
} }
if let Some(private_engine_id) = if let Some(private_engine_id) =
find_engine_with_match(engines, specific_default.default_private) find_engine_id_with_match(engines, specific_default.default_private)
{ {
default_engine_private_id.replace(private_engine_id); default_engine_private_id.replace(private_engine_id);
} }
@@ -221,7 +352,7 @@ fn find_engine_id(engines: &[SearchEngineDefinition], engine_id: String) -> Opti
} }
} }
fn find_engine_with_match( fn find_engine_id_with_match(
engines: &[SearchEngineDefinition], engines: &[SearchEngineDefinition],
engine_id_match: String, engine_id_match: String,
) -> Option<String> { ) -> Option<String> {
@@ -264,17 +395,18 @@ mod tests {
name: "Test".to_string(), name: "Test".to_string(),
partner_code: None, partner_code: None,
urls: JSONEngineUrls { urls: JSONEngineUrls {
search: JSONEngineUrl { search: Some(JSONEngineUrl {
base: Some("https://example.com".to_string()), base: Some("https://example.com".to_string()),
method: None, method: None,
params: None, params: None,
search_term_param_name: None, search_term_param_name: None,
}, }),
suggestions: None, suggestions: None,
trending: None, trending: None,
search_form: None,
}, },
}, },
JSONEngineVariant { &JSONEngineVariant {
environment: JSONVariantEnvironment { environment: JSONVariantEnvironment {
all_regions_and_locales: true, all_regions_and_locales: true,
..Default::default() ..Default::default()
@@ -283,7 +415,9 @@ mod tests {
partner_code: None, partner_code: None,
telemetry_suffix: None, telemetry_suffix: None,
urls: None, urls: None,
sub_variants: vec![],
}, },
&None,
); );
assert_eq!( assert_eq!(
@@ -297,7 +431,7 @@ mod tests {
name: "Test".to_string(), name: "Test".to_string(),
optional: false, optional: false,
order_hint: None, order_hint: None,
telemetry_suffix: None, telemetry_suffix: String::new(),
urls: SearchEngineUrls { urls: SearchEngineUrls {
search: SearchEngineUrl { search: SearchEngineUrl {
base: "https://example.com".to_string(), base: "https://example.com".to_string(),
@@ -306,7 +440,8 @@ mod tests {
search_term_param_name: None, search_term_param_name: None,
}, },
suggestions: None, suggestions: None,
trending: None trending: None,
search_form: None
} }
} }
) )
@@ -319,22 +454,32 @@ mod tests {
name: "Test".to_string(), name: "Test".to_string(),
partner_code: Some("firefox".to_string()), partner_code: Some("firefox".to_string()),
urls: JSONEngineUrls { urls: JSONEngineUrls {
search: JSONEngineUrl { search: Some(JSONEngineUrl {
base: Some("https://example.com".to_string()), base: Some("https://example.com".to_string()),
method: Some(crate::JSONEngineMethod::Post), method: Some(crate::JSONEngineMethod::Post),
params: Some(vec![SearchUrlParam { params: Some(vec![
name: "param".to_string(), SearchUrlParam {
value: Some("test param".to_string()), name: "param".to_string(),
experiment_config: None, value: Some("test param".to_string()),
}]), enterprise_value: None,
experiment_config: None,
},
SearchUrlParam {
name: "enterprise-name".to_string(),
value: None,
enterprise_value: Some("enterprise-value".to_string()),
experiment_config: None,
},
]),
search_term_param_name: Some("baz".to_string()), search_term_param_name: Some("baz".to_string()),
}, }),
suggestions: Some(JSONEngineUrl { suggestions: Some(JSONEngineUrl {
base: Some("https://example.com/suggestions".to_string()), base: Some("https://example.com/suggestions".to_string()),
method: Some(crate::JSONEngineMethod::Get), method: Some(crate::JSONEngineMethod::Get),
params: Some(vec![SearchUrlParam { params: Some(vec![SearchUrlParam {
name: "suggest-name".to_string(), name: "suggest-name".to_string(),
value: None, value: None,
enterprise_value: None,
experiment_config: Some("suggest-experiment-value".to_string()), experiment_config: Some("suggest-experiment-value".to_string()),
}]), }]),
search_term_param_name: Some("suggest".to_string()), search_term_param_name: Some("suggest".to_string()),
@@ -345,6 +490,18 @@ mod tests {
params: Some(vec![SearchUrlParam { params: Some(vec![SearchUrlParam {
name: "trend-name".to_string(), name: "trend-name".to_string(),
value: Some("trend-value".to_string()), value: Some("trend-value".to_string()),
enterprise_value: None,
experiment_config: None,
}]),
search_term_param_name: None,
}),
search_form: Some(JSONEngineUrl {
base: Some("https://example.com/search_form".to_string()),
method: Some(crate::JSONEngineMethod::Get),
params: Some(vec![SearchUrlParam {
name: "search-form-name".to_string(),
value: Some("search-form-value".to_string()),
enterprise_value: None,
experiment_config: None, experiment_config: None,
}]), }]),
search_term_param_name: None, search_term_param_name: None,
@@ -357,7 +514,7 @@ mod tests {
let result = SearchEngineDefinition::from_configuration_details( let result = SearchEngineDefinition::from_configuration_details(
"test", "test",
Lazy::force(&ENGINE_BASE).clone(), Lazy::force(&ENGINE_BASE).clone(),
JSONEngineVariant { &JSONEngineVariant {
environment: JSONVariantEnvironment { environment: JSONVariantEnvironment {
all_regions_and_locales: true, all_regions_and_locales: true,
..Default::default() ..Default::default()
@@ -366,7 +523,9 @@ mod tests {
partner_code: None, partner_code: None,
telemetry_suffix: None, telemetry_suffix: None,
urls: None, urls: None,
sub_variants: vec![],
}, },
&None,
); );
assert_eq!( assert_eq!(
@@ -380,16 +539,25 @@ mod tests {
name: "Test".to_string(), name: "Test".to_string(),
optional: false, optional: false,
order_hint: None, order_hint: None,
telemetry_suffix: None, telemetry_suffix: String::new(),
urls: SearchEngineUrls { urls: SearchEngineUrls {
search: SearchEngineUrl { search: SearchEngineUrl {
base: "https://example.com".to_string(), base: "https://example.com".to_string(),
method: "POST".to_string(), method: "POST".to_string(),
params: vec![SearchUrlParam { params: vec![
name: "param".to_string(), SearchUrlParam {
value: Some("test param".to_string()), name: "param".to_string(),
experiment_config: None, value: Some("test param".to_string()),
}], enterprise_value: None,
experiment_config: None,
},
SearchUrlParam {
name: "enterprise-name".to_string(),
value: None,
enterprise_value: Some("enterprise-value".to_string()),
experiment_config: None,
},
],
search_term_param_name: Some("baz".to_string()), search_term_param_name: Some("baz".to_string()),
}, },
suggestions: Some(SearchEngineUrl { suggestions: Some(SearchEngineUrl {
@@ -398,6 +566,7 @@ mod tests {
params: vec![SearchUrlParam { params: vec![SearchUrlParam {
name: "suggest-name".to_string(), name: "suggest-name".to_string(),
value: None, value: None,
enterprise_value: None,
experiment_config: Some("suggest-experiment-value".to_string()), experiment_config: Some("suggest-experiment-value".to_string()),
}], }],
search_term_param_name: Some("suggest".to_string()), search_term_param_name: Some("suggest".to_string()),
@@ -408,10 +577,22 @@ mod tests {
params: vec![SearchUrlParam { params: vec![SearchUrlParam {
name: "trend-name".to_string(), name: "trend-name".to_string(),
value: Some("trend-value".to_string()), value: Some("trend-value".to_string()),
enterprise_value: None,
experiment_config: None, experiment_config: None,
}], }],
search_term_param_name: None, search_term_param_name: None,
}) }),
search_form: Some(SearchEngineUrl {
base: "https://example.com/search_form".to_string(),
method: "GET".to_string(),
params: vec![SearchUrlParam {
name: "search-form-name".to_string(),
value: Some("search-form-value".to_string()),
enterprise_value: None,
experiment_config: None,
}],
search_term_param_name: None,
}),
} }
} }
) )
@@ -422,7 +603,7 @@ mod tests {
let result = SearchEngineDefinition::from_configuration_details( let result = SearchEngineDefinition::from_configuration_details(
"test", "test",
Lazy::force(&ENGINE_BASE).clone(), Lazy::force(&ENGINE_BASE).clone(),
JSONEngineVariant { &JSONEngineVariant {
environment: JSONVariantEnvironment { environment: JSONVariantEnvironment {
all_regions_and_locales: true, all_regions_and_locales: true,
..Default::default() ..Default::default()
@@ -431,22 +612,24 @@ mod tests {
partner_code: Some("trek".to_string()), partner_code: Some("trek".to_string()),
telemetry_suffix: Some("star".to_string()), telemetry_suffix: Some("star".to_string()),
urls: Some(JSONEngineUrls { urls: Some(JSONEngineUrls {
search: JSONEngineUrl { search: Some(JSONEngineUrl {
base: Some("https://example.com/variant".to_string()), base: Some("https://example.com/variant".to_string()),
method: Some(JSONEngineMethod::Get), method: Some(JSONEngineMethod::Get),
params: Some(vec![SearchUrlParam { params: Some(vec![SearchUrlParam {
name: "variant".to_string(), name: "variant".to_string(),
value: Some("test variant".to_string()), value: Some("test variant".to_string()),
enterprise_value: None,
experiment_config: None, experiment_config: None,
}]), }]),
search_term_param_name: Some("ship".to_string()), search_term_param_name: Some("ship".to_string()),
}, }),
suggestions: Some(JSONEngineUrl { suggestions: Some(JSONEngineUrl {
base: Some("https://example.com/suggestions-variant".to_string()), base: Some("https://example.com/suggestions-variant".to_string()),
method: Some(JSONEngineMethod::Get), method: Some(JSONEngineMethod::Get),
params: Some(vec![SearchUrlParam { params: Some(vec![SearchUrlParam {
name: "suggest-variant".to_string(), name: "suggest-variant".to_string(),
value: Some("sugg test variant".to_string()), value: Some("sugg test variant".to_string()),
enterprise_value: None,
experiment_config: None, experiment_config: None,
}]), }]),
search_term_param_name: Some("variant".to_string()), search_term_param_name: Some("variant".to_string()),
@@ -457,12 +640,26 @@ mod tests {
params: Some(vec![SearchUrlParam { params: Some(vec![SearchUrlParam {
name: "trend-variant".to_string(), name: "trend-variant".to_string(),
value: Some("trend test variant".to_string()), value: Some("trend test variant".to_string()),
enterprise_value: None,
experiment_config: None, experiment_config: None,
}]), }]),
search_term_param_name: Some("trend".to_string()), search_term_param_name: Some("trend".to_string()),
}), }),
search_form: Some(JSONEngineUrl {
base: Some("https://example.com/search_form".to_string()),
method: Some(crate::JSONEngineMethod::Get),
params: Some(vec![SearchUrlParam {
name: "search-form-name".to_string(),
value: Some("search-form-value".to_string()),
enterprise_value: None,
experiment_config: None,
}]),
search_term_param_name: None,
}),
}), }),
sub_variants: vec![],
}, },
&None,
); );
assert_eq!( assert_eq!(
@@ -476,7 +673,7 @@ mod tests {
name: "Test".to_string(), name: "Test".to_string(),
optional: true, optional: true,
order_hint: None, order_hint: None,
telemetry_suffix: Some("star".to_string()), telemetry_suffix: "star".to_string(),
urls: SearchEngineUrls { urls: SearchEngineUrls {
search: SearchEngineUrl { search: SearchEngineUrl {
base: "https://example.com/variant".to_string(), base: "https://example.com/variant".to_string(),
@@ -484,6 +681,7 @@ mod tests {
params: vec![SearchUrlParam { params: vec![SearchUrlParam {
name: "variant".to_string(), name: "variant".to_string(),
value: Some("test variant".to_string()), value: Some("test variant".to_string()),
enterprise_value: None,
experiment_config: None, experiment_config: None,
}], }],
search_term_param_name: Some("ship".to_string()), search_term_param_name: Some("ship".to_string()),
@@ -494,6 +692,7 @@ mod tests {
params: vec![SearchUrlParam { params: vec![SearchUrlParam {
name: "suggest-variant".to_string(), name: "suggest-variant".to_string(),
value: Some("sugg test variant".to_string()), value: Some("sugg test variant".to_string()),
enterprise_value: None,
experiment_config: None, experiment_config: None,
}], }],
search_term_param_name: Some("variant".to_string()), search_term_param_name: Some("variant".to_string()),
@@ -504,10 +703,207 @@ mod tests {
params: vec![SearchUrlParam { params: vec![SearchUrlParam {
name: "trend-variant".to_string(), name: "trend-variant".to_string(),
value: Some("trend test variant".to_string()), value: Some("trend test variant".to_string()),
enterprise_value: None,
experiment_config: None, experiment_config: None,
}], }],
search_term_param_name: Some("trend".to_string()), search_term_param_name: Some("trend".to_string()),
}) }),
search_form: Some(SearchEngineUrl {
base: "https://example.com/search_form".to_string(),
method: "GET".to_string(),
params: vec![SearchUrlParam {
name: "search-form-name".to_string(),
value: Some("search-form-value".to_string()),
enterprise_value: None,
experiment_config: None,
}],
search_term_param_name: None,
}),
}
}
)
}
#[test]
fn test_from_configuration_details_merges_sub_variants() {
let result = SearchEngineDefinition::from_configuration_details(
"test",
Lazy::force(&ENGINE_BASE).clone(),
&JSONEngineVariant {
environment: JSONVariantEnvironment {
all_regions_and_locales: true,
..Default::default()
},
optional: true,
partner_code: Some("trek".to_string()),
telemetry_suffix: Some("star".to_string()),
urls: Some(JSONEngineUrls {
search: Some(JSONEngineUrl {
base: Some("https://example.com/variant".to_string()),
method: Some(JSONEngineMethod::Get),
params: Some(vec![SearchUrlParam {
name: "variant".to_string(),
value: Some("test variant".to_string()),
enterprise_value: None,
experiment_config: None,
}]),
search_term_param_name: Some("ship".to_string()),
}),
suggestions: Some(JSONEngineUrl {
base: Some("https://example.com/suggestions-variant".to_string()),
method: Some(JSONEngineMethod::Get),
params: Some(vec![SearchUrlParam {
name: "suggest-variant".to_string(),
value: Some("sugg test variant".to_string()),
enterprise_value: None,
experiment_config: None,
}]),
search_term_param_name: Some("variant".to_string()),
}),
trending: Some(JSONEngineUrl {
base: Some("https://example.com/trending-variant".to_string()),
method: Some(JSONEngineMethod::Get),
params: Some(vec![SearchUrlParam {
name: "trend-variant".to_string(),
value: Some("trend test variant".to_string()),
enterprise_value: None,
experiment_config: None,
}]),
search_term_param_name: Some("trend".to_string()),
}),
search_form: Some(JSONEngineUrl {
base: Some("https://example.com/search-form-variant".to_string()),
method: Some(crate::JSONEngineMethod::Get),
params: Some(vec![SearchUrlParam {
name: "search-form-variant".to_string(),
value: Some("search form variant".to_string()),
enterprise_value: None,
experiment_config: None,
}]),
search_term_param_name: None,
}),
}),
// This would be the list of sub-variants for this part of the
// configuration, however it is not used as the actual sub-variant
// to be merged is passed as the third argument to
// `from_configuration_details`.
sub_variants: vec![],
},
&Some(JSONEngineVariant {
environment: JSONVariantEnvironment {
all_regions_and_locales: true,
..Default::default()
},
optional: true,
partner_code: Some("trek2".to_string()),
telemetry_suffix: Some("star2".to_string()),
urls: Some(JSONEngineUrls {
search: Some(JSONEngineUrl {
base: Some("https://example.com/subvariant".to_string()),
method: Some(JSONEngineMethod::Get),
params: Some(vec![SearchUrlParam {
name: "subvariant".to_string(),
value: Some("test subvariant".to_string()),
enterprise_value: None,
experiment_config: None,
}]),
search_term_param_name: Some("shuttle".to_string()),
}),
suggestions: Some(JSONEngineUrl {
base: Some("https://example.com/suggestions-subvariant".to_string()),
method: Some(JSONEngineMethod::Get),
params: Some(vec![SearchUrlParam {
name: "suggest-subvariant".to_string(),
value: Some("sugg test subvariant".to_string()),
enterprise_value: None,
experiment_config: None,
}]),
search_term_param_name: Some("subvariant".to_string()),
}),
trending: Some(JSONEngineUrl {
base: Some("https://example.com/trending-subvariant".to_string()),
method: Some(JSONEngineMethod::Get),
params: Some(vec![SearchUrlParam {
name: "trend-subvariant".to_string(),
value: Some("trend test subvariant".to_string()),
enterprise_value: None,
experiment_config: None,
}]),
search_term_param_name: Some("subtrend".to_string()),
}),
search_form: Some(JSONEngineUrl {
base: Some("https://example.com/search-form-subvariant".to_string()),
method: Some(crate::JSONEngineMethod::Get),
params: Some(vec![SearchUrlParam {
name: "search-form-subvariant".to_string(),
value: Some("search form subvariant".to_string()),
enterprise_value: None,
experiment_config: None,
}]),
search_term_param_name: None,
}),
}),
sub_variants: vec![],
}),
);
assert_eq!(
result,
SearchEngineDefinition {
aliases: vec!["foo".to_string(), "bar".to_string()],
charset: "ISO-8859-15".to_string(),
classification: SearchEngineClassification::Unknown,
identifier: "test".to_string(),
partner_code: "trek2".to_string(),
name: "Test".to_string(),
optional: true,
order_hint: None,
telemetry_suffix: "star2".to_string(),
urls: SearchEngineUrls {
search: SearchEngineUrl {
base: "https://example.com/subvariant".to_string(),
method: "GET".to_string(),
params: vec![SearchUrlParam {
name: "subvariant".to_string(),
value: Some("test subvariant".to_string()),
enterprise_value: None,
experiment_config: None,
}],
search_term_param_name: Some("shuttle".to_string()),
},
suggestions: Some(SearchEngineUrl {
base: "https://example.com/suggestions-subvariant".to_string(),
method: "GET".to_string(),
params: vec![SearchUrlParam {
name: "suggest-subvariant".to_string(),
value: Some("sugg test subvariant".to_string()),
enterprise_value: None,
experiment_config: None,
}],
search_term_param_name: Some("subvariant".to_string()),
}),
trending: Some(SearchEngineUrl {
base: "https://example.com/trending-subvariant".to_string(),
method: "GET".to_string(),
params: vec![SearchUrlParam {
name: "trend-subvariant".to_string(),
value: Some("trend test subvariant".to_string()),
enterprise_value: None,
experiment_config: None,
}],
search_term_param_name: Some("subtrend".to_string()),
}),
search_form: Some(SearchEngineUrl {
base: "https://example.com/search-form-subvariant".to_string(),
method: "GET".to_string(),
params: vec![SearchUrlParam {
name: "search-form-subvariant".to_string(),
value: Some("search form subvariant".to_string()),
enterprise_value: None,
experiment_config: None,
}],
search_term_param_name: None,
}),
} }
} }
) )

View File

@@ -6,6 +6,7 @@ mod configuration_types;
mod environment_matching; mod environment_matching;
mod error; mod error;
mod filter; mod filter;
mod sort_helpers;
pub use error::SearchApiError; pub use error::SearchApiError;
pub mod selector; pub mod selector;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,273 @@
/* 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/. */
//! This module defines functions for sorting search engines based on priority
//! and order hints, falling back to alphabetical sorting when neither is provided.
use crate::SearchEngineDefinition;
pub(crate) fn set_engine_order(engines: &mut [SearchEngineDefinition], ordered_engines: &[String]) {
let mut order_number = ordered_engines.len();
for engine_id in ordered_engines {
if let Some(found_engine) = find_engine_with_match_mut(engines, engine_id) {
found_engine.order_hint = Some(order_number as u32);
order_number -= 1;
}
}
}
pub(crate) fn sort(
default_engine_id: Option<&String>,
default_private_engine_id: Option<&String>,
a: &SearchEngineDefinition,
b: &SearchEngineDefinition,
) -> std::cmp::Ordering {
let b_index = get_priority(b, default_engine_id, default_private_engine_id);
let a_index = get_priority(a, default_engine_id, default_private_engine_id);
let order = b_index.cmp(&a_index);
// TODO: update the comparison to use ICU4X when it's available.
// See Bug 1945295: https://bugzilla.mozilla.org/show_bug.cgi?id=1945295
// If order is equal and order_hint is None for both, fall back to alphabetical sorting
if order == std::cmp::Ordering::Equal {
return a.identifier.cmp(&b.identifier);
}
order
}
fn find_engine_with_match_mut<'a>(
engines: &'a mut [SearchEngineDefinition],
engine_id_match: &String,
) -> Option<&'a mut SearchEngineDefinition> {
if engine_id_match.is_empty() {
return None;
}
if let Some(match_no_star) = engine_id_match.strip_suffix('*') {
return engines
.iter_mut()
.find(|e| e.identifier.starts_with(match_no_star));
}
engines
.iter_mut()
.find(|e| e.identifier == *engine_id_match)
}
fn get_priority(
engine: &SearchEngineDefinition,
default_engine_id: Option<&String>,
default_private_engine_id: Option<&String>,
) -> u32 {
if Some(&engine.identifier) == default_engine_id {
return u32::MAX;
}
if Some(&engine.identifier) == default_private_engine_id {
return u32::MAX - 1;
}
engine.order_hint.unwrap_or(0)
}
#[cfg(test)]
mod tests {
use super::*;
use crate::types::*;
use pretty_assertions::assert_eq;
fn create_engine(engine_id: &str, order_hint: Option<u32>) -> SearchEngineDefinition {
SearchEngineDefinition {
identifier: engine_id.to_string(),
order_hint,
..Default::default()
}
}
#[test]
fn test_find_engine_with_match_mut_starts_with() {
let mut engines = vec![
create_engine("wiki-ca", None),
create_engine("wiki-uk", None),
create_engine("test-engine", None),
];
let found_engine = find_engine_with_match_mut(&mut engines, &"wiki*".to_string());
assert_eq!(
found_engine.unwrap().identifier,
"wiki-ca",
"Should match the first engine that starts with 'wiki'."
);
}
#[test]
fn test_set_engine_order_full_list() {
let mut engines = vec![
create_engine("last-engine", None),
create_engine("secondary-engine", None),
create_engine("primary-engine", None),
];
let ordered_engines_list = vec![
"primary-engine".to_string(),
"secondary-engine".to_string(),
"last-engine".to_string(),
];
set_engine_order(&mut engines, &ordered_engines_list);
let expected_order_hints = vec![
("last-engine", Some(1)),
("secondary-engine", Some(2)),
("primary-engine", Some(3)),
];
let actual_order_hints: Vec<(&str, Option<u32>)> = engines
.iter()
.map(|e| (e.identifier.as_str(), e.order_hint))
.collect();
assert_eq!(
actual_order_hints, expected_order_hints,
"Should assign correct order hints when all engines are in the ordered engines list, the first engine with the highest and decreasing for each next engine."
)
}
#[test]
fn test_set_engine_order_partial_list() {
let mut engines = vec![
create_engine("secondary-engine", None),
create_engine("primary-engine", None),
create_engine("no-order-hint-engine", None),
];
let ordered_engines_list =
vec!["primary-engine".to_string(), "secondary-engine".to_string()];
set_engine_order(&mut engines, &ordered_engines_list);
let expected_order_hints = vec![
("secondary-engine", Some(1)),
("primary-engine", Some(2)),
("no-order-hint-engine", None),
];
let actual_order_hints: Vec<(&str, Option<u32>)> = engines
.iter()
.map(|e| (e.identifier.as_str(), e.order_hint))
.collect();
assert_eq!(
actual_order_hints, expected_order_hints,
"Should assign correct order hints when some of the engines are in the ordered engines list, the first engine with the highest and decreasing for each next engine."
)
}
#[test]
fn test_sort_engines_by_order_hint() {
let default_engine_id = None;
let default_private_engine_id = None;
let mut engines = vec![
create_engine("c-engine", Some(3)),
create_engine("b-engine", Some(2)),
create_engine("a-engine", Some(1)),
];
engines.sort_by(|a, b| {
sort(
default_engine_id.as_ref(),
default_private_engine_id.as_ref(),
a,
b,
)
});
let actual_order: Vec<&str> = engines.iter().map(|e| e.identifier.as_str()).collect();
let expected_order = vec!["c-engine", "b-engine", "a-engine"];
assert_eq!(
actual_order, expected_order,
"Should sort engines by descending order hint, with the highest order hint appearing first."
)
}
#[test]
fn test_sort_engines_alphabetically_without_order_hint() {
let default_engine_id = None;
let default_private_engine_id = None;
let mut engines = vec![
create_engine("c-engine", None),
create_engine("b-engine", None),
create_engine("a-engine", None),
];
engines.sort_by(|a, b| {
sort(
default_engine_id.as_ref(),
default_private_engine_id.as_ref(),
a,
b,
)
});
let actual_order: Vec<&str> = engines.iter().map(|e| e.identifier.as_str()).collect();
let expected_order = vec!["a-engine", "b-engine", "c-engine"];
assert_eq!(
actual_order, expected_order,
"Should sort engines alphabetically when there are no order hints."
)
}
#[test]
fn test_sort_engines_by_order_hint_and_alphabetically() {
let default_engine_id = None;
let default_private_engine_id = None;
let mut engines = vec![
create_engine("f-engine", None),
create_engine("e-engine", None),
create_engine("d-engine", None),
create_engine("c-engine", Some(4)),
create_engine("b-engine", Some(5)),
create_engine("a-engine", Some(6)),
];
engines.sort_by(|a, b| {
sort(
default_engine_id.as_ref(),
default_private_engine_id.as_ref(),
a,
b,
)
});
let actual_order: Vec<&str> = engines.iter().map(|e| e.identifier.as_str()).collect();
let expected_order = vec![
"a-engine", "b-engine", "c-engine", "d-engine", "e-engine", "f-engine",
];
assert_eq!(
actual_order, expected_order,
"Should sort engines by order hint before sorting alphabetically."
)
}
#[test]
fn test_sort_engines_with_defaults() {
let default_engine_id = Some("a-engine".to_string());
let default_private_engine_id = Some("b-engine".to_string());
let mut engines = vec![
create_engine("c-engine", Some(3)),
create_engine("a-engine", Some(1)), // Default engine should be first
create_engine("b-engine", Some(2)), // Default private engine should be second
];
engines.sort_by(|a, b| {
sort(
default_engine_id.as_ref(),
default_private_engine_id.as_ref(),
a,
b,
)
});
let actual_order: Vec<&str> = engines.iter().map(|e| e.identifier.as_str()).collect();
let expected_order = vec!["a-engine", "b-engine", "c-engine"];
assert_eq!(
actual_order, expected_order,
"Should have sorted the default and private default to have the highest priority."
)
}
#[test]
fn test_sort_engines_non_ascii_without_order_hint() {
// TODO: update the comparison to use ICU4X when it's available.
// See Bug 1945295: https://bugzilla.mozilla.org/show_bug.cgi?id=1945295
}
}

View File

@@ -92,10 +92,15 @@ pub struct SearchUserEnvironment {
pub struct SearchUrlParam { pub struct SearchUrlParam {
/// The name of the parameter in the url. /// The name of the parameter in the url.
pub name: String, pub name: String,
/// The parameter value, this may be a static value, or additionally contain /// The parameter value, this may be a static value, or additionally contain
/// a parameter replacement, e.g. `{inputEncoding}`. For the partner code /// a parameter replacement, e.g. `{inputEncoding}`. For the partner code
/// parameter, this field should be `{partnerCode}`. /// parameter, this field should be `{partnerCode}`.
pub value: Option<String>, pub value: Option<String>,
/// Same as value but only used if Services.polices.isEnterprise is true. Overrides other parameters of the same name.
pub enterprise_value: Option<String>,
/// The value for the parameter will be derived from the equivalent experiment /// The value for the parameter will be derived from the equivalent experiment
/// configuration value. /// configuration value.
/// Only desktop uses this currently. /// Only desktop uses this currently.
@@ -134,6 +139,9 @@ pub struct SearchEngineUrls {
/// The URL to use for trending suggestions. /// The URL to use for trending suggestions.
pub trending: Option<SearchEngineUrl>, pub trending: Option<SearchEngineUrl>,
/// The URL of the search engine homepage.
pub search_form: Option<SearchEngineUrl>,
} }
/// The list of acceptable classifications for a search engine. /// The list of acceptable classifications for a search engine.
@@ -188,8 +196,9 @@ pub struct SearchEngineDefinition {
pub partner_code: String, pub partner_code: String,
/// Optional suffix that is appended to the search engine identifier /// Optional suffix that is appended to the search engine identifier
/// following a dash, i.e. `<identifier>-<suffix>` /// following a dash, i.e. `<identifier>-<suffix>`. If it is an empty string
pub telemetry_suffix: Option<String>, /// no dash should be appended.
pub telemetry_suffix: String,
/// The URLs associated with the search engine. /// The URLs associated with the search engine.
pub urls: SearchEngineUrls, pub urls: SearchEngineUrls,
@@ -199,7 +208,7 @@ pub struct SearchEngineDefinition {
/// The higher the number, the nearer to the front it should be. /// The higher the number, the nearer to the front it should be.
/// If the number is not specified, other methods of sorting may be relied /// If the number is not specified, other methods of sorting may be relied
/// upon (e.g. alphabetical). /// upon (e.g. alphabetical).
pub order_hint: Option<u8>, pub order_hint: Option<u32>,
} }
/// Details of the search engines to display to the user, generated as a result /// Details of the search engines to display to the user, generated as a result

View File

@@ -1 +1 @@
{"files":{"Cargo.toml":"22a76fdf06c848eeb950bb8ddb0cb4ec918adbeef3eae2bb7006a6ecf76f5dfa","src/conn_ext.rs":"1280fb1f06b74ed312e73f34c4fd86f538411c4b3d4eeccb631c80d02e295645","src/debug_tools.rs":"bece2bc3d35379b81ea2f942a0a3e909e0ab0553656505904745548eacaf402a","src/each_chunk.rs":"e900a4ebadad31b0a87cb8d7c3ed5aeb7325d4d380ae1d9174eff62c78facdcc","src/lazy.rs":"a96b4f4ec572538b49cdfa8fee981dcf5143a5f51163fb8a573d3ac128df70f9","src/lib.rs":"32c7f50c283e3406d70b0cb787984600843de74bbfb3d94ffc3a4e44af35ecfa","src/maybe_cached.rs":"0b18425595055883a98807fbd62ff27a79c18af34e7cb3439f8c3438463ef2dd","src/open_database.rs":"a8b2fd7dccda690093690907af7daeac0093ad7969a41c106c23addc25180084","src/repeat.rs":"3dad3cbc6f47fc7598fc7b0fbf79b9c915322396d1f64d3d09651d100d428351"},"package":null} {"files":{"Cargo.toml":"22a76fdf06c848eeb950bb8ddb0cb4ec918adbeef3eae2bb7006a6ecf76f5dfa","src/conn_ext.rs":"1280fb1f06b74ed312e73f34c4fd86f538411c4b3d4eeccb631c80d02e295645","src/debug_tools.rs":"bece2bc3d35379b81ea2f942a0a3e909e0ab0553656505904745548eacaf402a","src/each_chunk.rs":"e900a4ebadad31b0a87cb8d7c3ed5aeb7325d4d380ae1d9174eff62c78facdcc","src/lazy.rs":"a96b4f4ec572538b49cdfa8fee981dcf5143a5f51163fb8a573d3ac128df70f9","src/lib.rs":"cb501b3b0482d549cbe6f0350d7321ed315269ccd75215af2582aae340fe354b","src/maybe_cached.rs":"0b18425595055883a98807fbd62ff27a79c18af34e7cb3439f8c3438463ef2dd","src/open_database.rs":"0e50c02b3a052c6b3cdc742409d46fb40a5939080c1f7ec1684241dc2b02f269","src/repeat.rs":"3dad3cbc6f47fc7598fc7b0fbf79b9c915322396d1f64d3d09651d100d428351"},"package":null}

View File

@@ -38,6 +38,33 @@ pub fn escape_string_for_pragma(s: &str) -> String {
s.replace('\'', "''") s.replace('\'', "''")
} }
/// Default SQLite pragmas
///
/// Most components should just stick to these defaults.
pub fn setup_sqlite_defaults(conn: &rusqlite::Connection) -> rusqlite::Result<()> {
conn.execute_batch(
"
PRAGMA temp_store = 2;
PRAGMA journal_mode = WAL;
",
)?;
let page_size: usize = conn.query_row("PRAGMA page_size", (), |row| row.get(0))?;
// Aim to checkpoint at 512Kb
let target_checkpoint_size = 2usize.pow(19);
// Truncate the journal if it more than 3x larger than the target size
let journal_size_limit = target_checkpoint_size * 3;
conn.execute_batch(&format!(
"
PRAGMA wal_autocheckpoint = {};
PRAGMA journal_size_limit = {};
",
target_checkpoint_size / page_size,
journal_size_limit,
))?;
Ok(())
}
#[cfg(test)] #[cfg(test)]
mod test { mod test {
use super::*; use super::*;
@@ -47,4 +74,21 @@ mod test {
assert_eq!(escape_string_for_pragma("'foo'bar'"), "''foo''bar''"); assert_eq!(escape_string_for_pragma("'foo'bar'"), "''foo''bar''");
assert_eq!(escape_string_for_pragma("''"), "''''"); assert_eq!(escape_string_for_pragma("''"), "''''");
} }
#[test]
fn test_sqlite_defaults() {
let conn = rusqlite::Connection::open_in_memory().unwrap();
// Simulate a default page size,
// On Mobile, these are set by the OS. On Desktop, these are set by the build system when
// we compile SQLite.
conn.execute("PRAGMA page_size = 8192", ()).unwrap();
setup_sqlite_defaults(&conn).unwrap();
let autocheckpoint: usize = conn
.query_row("PRAGMA wal_autocheckpoint", (), |row| row.get(0))
.unwrap();
// We should aim to auto-checkpoint at 512kb, which is 64 pages when the page size is 8k
assert_eq!(autocheckpoint, 64);
// We could also check the journal size limit, but that's harder to query with a pragma.
// If we go the math right once, we should get it for the other case.
}
} }

View File

@@ -29,13 +29,19 @@
/// ///
/// See the autofill DB code for an example. /// See the autofill DB code for an example.
/// ///
use crate::ConnExt; use std::{
borrow::Cow,
path::Path,
sync::atomic::{AtomicUsize, Ordering},
};
use rusqlite::{ use rusqlite::{
Connection, Error as RusqliteError, ErrorCode, OpenFlags, Transaction, TransactionBehavior, Connection, Error as RusqliteError, ErrorCode, OpenFlags, Transaction, TransactionBehavior,
}; };
use std::path::Path;
use thiserror::Error; use thiserror::Error;
use crate::ConnExt;
#[derive(Error, Debug)] #[derive(Error, Debug)]
pub enum Error { pub enum Error {
#[error("Incompatible database version: {0}")] #[error("Incompatible database version: {0}")]
@@ -118,6 +124,19 @@ pub fn open_database_with_flags<CI: ConnectionInitializer, P: AsRef<Path>>(
}) })
} }
/// OpenFlags for a read-write database
pub fn read_write_flags() -> OpenFlags {
OpenFlags::SQLITE_OPEN_URI
| OpenFlags::SQLITE_OPEN_NO_MUTEX
| OpenFlags::SQLITE_OPEN_CREATE
| OpenFlags::SQLITE_OPEN_READ_WRITE
}
/// OpenFlags for a read-only database
pub fn read_only_flags() -> OpenFlags {
OpenFlags::SQLITE_OPEN_URI | OpenFlags::SQLITE_OPEN_NO_MUTEX | OpenFlags::SQLITE_OPEN_READ_ONLY
}
fn do_open_database_with_flags<CI: ConnectionInitializer, P: AsRef<Path>>( fn do_open_database_with_flags<CI: ConnectionInitializer, P: AsRef<Path>>(
path: P, path: P,
open_flags: OpenFlags, open_flags: OpenFlags,
@@ -239,6 +258,17 @@ fn set_schema_version(conn: &Connection, version: u32) -> Result<()> {
Ok(()) Ok(())
} }
// Get a unique in-memory database path
//
// This can be very useful for testing.
pub fn unique_in_memory_db_path() -> String {
static COUNTER: AtomicUsize = AtomicUsize::new(0);
format!(
"file:in-memory-db-{}?mode=memory&cache=shared",
COUNTER.fetch_add(1, Ordering::Relaxed)
)
}
// It would be nice for this to be #[cfg(test)], but that doesn't allow it to be used in tests for // It would be nice for this to be #[cfg(test)], but that doesn't allow it to be used in tests for
// our other crates. // our other crates.
pub mod test_utils { pub mod test_utils {
@@ -426,7 +456,10 @@ pub mod test_utils {
pub fn assert_schema_matches_new_database(&self) { pub fn assert_schema_matches_new_database(&self) {
let db = self.open(); let db = self.open();
let new_db = open_memory_database(&self.connection_initializer).unwrap(); let new_db = match open_memory_database(&self.connection_initializer) {
Ok(db) => db,
Err(e) => panic!("Creating new database failed:\n{e}"),
};
compare_sql_maps("table", get_sql(&db, "table"), get_sql(&new_db, "table")); compare_sql_maps("table", get_sql(&db, "table"), get_sql(&new_db, "table"));
compare_sql_maps("index", get_sql(&db, "index"), get_sql(&new_db, "index")); compare_sql_maps("index", get_sql(&db, "index"), get_sql(&new_db, "index"));
@@ -471,12 +504,30 @@ pub mod test_utils {
} }
for key in old_db_keys { for key in old_db_keys {
assert_eq!( assert_eq!(
old_items.get(key).unwrap(), old_items.get(key).unwrap().as_deref().map(normalize),
new_items.get(key).unwrap(), new_items.get(key).unwrap().as_deref().map(normalize),
"sql differs for {type_} {key}" "sql differs for {type_} {key}"
); );
} }
} }
/// Normalize SQL code by changing all whitespace to a single space.
fn normalize(sql: &str) -> String {
sql.split('\'')
.enumerate()
.map(|(i, part)| {
// Only normalize the even parts. Odd parts are either inside a string literal.
// Note: SQLite uses a double quote (`''`) as the escape, which works with this
// system. We'll just end up normalizing the empty string, which doesn't hurt
// anything.
if (i % 2) == 0 {
Cow::Owned(part.split_whitespace().collect::<Vec<_>>().join(" "))
} else {
Cow::Borrowed(part)
}
})
.collect()
}
} }
#[cfg(test)] #[cfg(test)]

View File

@@ -1 +1 @@
{"files":{"Cargo.toml":"b02cecce9453963daaaa3b10cd21ca52741496cc3a67de6a3f8b2a7fe45af044","README.md":"5e28baf874b643d756228bdab345e287bf107d3182dfe6a18aafadcc4b9a3fc9","benches/benchmark_all.rs":"5909dfb1e62793afb1f2bc15b75914527a4d14fce6796307c04a309e45c0598c","metrics.yaml":"0540ab2271aeab7f07335c7ceec12acde942995f9dcb3c29070489aa61899d56","src/benchmarks/README.md":"ccee8dbddba8762d0453fa855bd6984137b224b8c019f3dd8e86a3c303f51d71","src/benchmarks/client.rs":"a777c0b876a481a21f9d5fbb696b42672ed0b4af359f62f047ac8240d3e35853","src/benchmarks/geoname.rs":"00fab05cf9465cf8e22e143cde75a81885411001b240af00efda4071975d0563","src/benchmarks/ingest.rs":"d4bde332287cc4a8d95fd7852d7563537f30c578e218a01d32ea7a3d50af3811","src/benchmarks/mod.rs":"1f21f3d3773f88e42c736eed8f770d09bc3fcee559988dbff79a1b02f250b9c5","src/benchmarks/query.rs":"d54946063e72cf98e7f46d94665c17c66af637774c2bb50cd5798dbe63d74f3c","src/bin/debug_ingestion_sizes.rs":"ce6e810be7b3fc19e826d75b622b82cfab5a1a99397a6d0833c2c4eebff2d364","src/config.rs":"0ca876e845841bb6429862c0904c82265003f53b55aea053fac60aed278586a7","src/db.rs":"2764cb57309ef69231f3bd2cefe8c0207bb0e8d24d7fbf46dce3e6c45e4dc89a","src/error.rs":"e2ef3ec0e0b2b8ecbb8f2f1717d4cb753af06913b8395d086b7643098ad100a7","src/fakespot.rs":"f501c9fe5296e7c130a9fcb532b861465717652cb5ef688230bc7a3b94df91b1","src/geoname.rs":"811f7b26e547be5557bdefb3867206dd4f30237eaef6b3602bef683db5f44586","src/lib.rs":"67d77bf55498ce57c9e607d34e2bc5820403dda1207e85bf1f1c79d235d862f7","src/metrics.rs":"871f0d834efbbc9e26d61f66fa31f0021dcf41444746cd7c082f93ba9628e399","src/pocket.rs":"1316668840ec9b4ea886223921dc9d3b5a1731d1a5206c0b1089f2a6c45c1b7b","src/provider.rs":"b1ec744b867eb5bb40c7e52750e0ff8cb1b34568583e3a625a8d1740517eed6e","src/query.rs":"dcf3c3ddb72564d61b93a0360da6e6e8cb6e62d75b9a743e4a4cf19fb800af68","src/rs.rs":"1d636fac6fdf332c8d14905766d1a1993b7070e0e9f4ca3e427ce9940d8ace5b","src/schema.rs":"96881d36a63dedc63d01481ebf0cdeb775a3d676dafa2dd294bffa6d3d006eb7","src/store.rs":"63a4ffcefc00503efc77e1eccecde5cb540c6f039b0bf1c02e11bac32c76e6b4","src/suggestion.rs":"cdfc2a60355dfb15dec3d941f1d8137daa2f2ed08465717460e04075911d182b","src/testing/client.rs":"f8c9bd32d0f4cf364daebe114d580c7e36a83b69c07884d14170969620d9a437","src/testing/data.rs":"d92561f8a95cce108c43e5ed040ef9104bc4f370c01f47fe041c2f2c2a493ee0","src/testing/mod.rs":"4d2781c77ed9ace9d80d6d00c63a06bf28a4156f223616fffe3c07e64a8041db","src/util.rs":"52c6ec405637afa2d1a89f29fbbb7dcc341546b6deb97d326c4490bbf8713cb0","src/weather.rs":"8e8958a5a16f09f7d33efc6036d4ba980a2eea53c2d16bcbb37debebde28ef61","src/yelp.rs":"0b9dfa698d9c3162d47c0103d1799838d444345f9d7f943eedc6bcc98fd8b57d","uniffi.toml":"8205e4679ac26d53e70af0f85c013fd27cda1119f4322aebf5f2b9403d45a611"},"package":null} {"files":{"Cargo.toml":"b02cecce9453963daaaa3b10cd21ca52741496cc3a67de6a3f8b2a7fe45af044","README.md":"5e28baf874b643d756228bdab345e287bf107d3182dfe6a18aafadcc4b9a3fc9","benches/benchmark_all.rs":"5909dfb1e62793afb1f2bc15b75914527a4d14fce6796307c04a309e45c0598c","metrics.yaml":"0540ab2271aeab7f07335c7ceec12acde942995f9dcb3c29070489aa61899d56","src/benchmarks/README.md":"ccee8dbddba8762d0453fa855bd6984137b224b8c019f3dd8e86a3c303f51d71","src/benchmarks/client.rs":"a777c0b876a481a21f9d5fbb696b42672ed0b4af359f62f047ac8240d3e35853","src/benchmarks/geoname.rs":"00fab05cf9465cf8e22e143cde75a81885411001b240af00efda4071975d0563","src/benchmarks/ingest.rs":"d4bde332287cc4a8d95fd7852d7563537f30c578e218a01d32ea7a3d50af3811","src/benchmarks/mod.rs":"1f21f3d3773f88e42c736eed8f770d09bc3fcee559988dbff79a1b02f250b9c5","src/benchmarks/query.rs":"d54946063e72cf98e7f46d94665c17c66af637774c2bb50cd5798dbe63d74f3c","src/bin/debug_ingestion_sizes.rs":"ce6e810be7b3fc19e826d75b622b82cfab5a1a99397a6d0833c2c4eebff2d364","src/config.rs":"0ca876e845841bb6429862c0904c82265003f53b55aea053fac60aed278586a7","src/db.rs":"0aa826507cceaff99cf5f45040ff0cd8cc5424346f0341f0d3ad27c685f30e74","src/error.rs":"e2ef3ec0e0b2b8ecbb8f2f1717d4cb753af06913b8395d086b7643098ad100a7","src/fakespot.rs":"f501c9fe5296e7c130a9fcb532b861465717652cb5ef688230bc7a3b94df91b1","src/geoname.rs":"811f7b26e547be5557bdefb3867206dd4f30237eaef6b3602bef683db5f44586","src/lib.rs":"67d77bf55498ce57c9e607d34e2bc5820403dda1207e85bf1f1c79d235d862f7","src/metrics.rs":"871f0d834efbbc9e26d61f66fa31f0021dcf41444746cd7c082f93ba9628e399","src/pocket.rs":"1316668840ec9b4ea886223921dc9d3b5a1731d1a5206c0b1089f2a6c45c1b7b","src/provider.rs":"b1ec744b867eb5bb40c7e52750e0ff8cb1b34568583e3a625a8d1740517eed6e","src/query.rs":"dcf3c3ddb72564d61b93a0360da6e6e8cb6e62d75b9a743e4a4cf19fb800af68","src/rs.rs":"1d636fac6fdf332c8d14905766d1a1993b7070e0e9f4ca3e427ce9940d8ace5b","src/schema.rs":"ca93e8bbc2d1d42487177f242838f9a36c03ac387b031c8a9f2c0d21cec245a0","src/store.rs":"f4236f04a53a4f8e5f25d210e83cbdeb84f25696cf9229207320f4f3cf930a46","src/suggestion.rs":"cdfc2a60355dfb15dec3d941f1d8137daa2f2ed08465717460e04075911d182b","src/testing/client.rs":"f8c9bd32d0f4cf364daebe114d580c7e36a83b69c07884d14170969620d9a437","src/testing/data.rs":"d92561f8a95cce108c43e5ed040ef9104bc4f370c01f47fe041c2f2c2a493ee0","src/testing/mod.rs":"4d2781c77ed9ace9d80d6d00c63a06bf28a4156f223616fffe3c07e64a8041db","src/util.rs":"52c6ec405637afa2d1a89f29fbbb7dcc341546b6deb97d326c4490bbf8713cb0","src/weather.rs":"8e8958a5a16f09f7d33efc6036d4ba980a2eea53c2d16bcbb37debebde28ef61","src/yelp.rs":"0b9dfa698d9c3162d47c0103d1799838d444345f9d7f943eedc6bcc98fd8b57d","uniffi.toml":"8205e4679ac26d53e70af0f85c013fd27cda1119f4322aebf5f2b9403d45a611"},"package":null}

View File

@@ -11,9 +11,9 @@ use remote_settings::RemoteSettingsResponse;
use rusqlite::{ use rusqlite::{
named_params, named_params,
types::{FromSql, ToSql}, types::{FromSql, ToSql},
Connection, OpenFlags, OptionalExtension, Connection, OptionalExtension,
}; };
use sql_support::{open_database::open_database_with_flags, repeat_sql_vars, ConnExt}; use sql_support::{open_database, repeat_sql_vars, ConnExt};
use crate::{ use crate::{
config::{SuggestGlobalConfig, SuggestProviderConfig}, config::{SuggestGlobalConfig, SuggestProviderConfig},
@@ -53,24 +53,6 @@ pub(crate) enum ConnectionType {
ReadWrite, ReadWrite,
} }
impl From<ConnectionType> for OpenFlags {
fn from(type_: ConnectionType) -> Self {
match type_ {
ConnectionType::ReadOnly => {
OpenFlags::SQLITE_OPEN_URI
| OpenFlags::SQLITE_OPEN_NO_MUTEX
| OpenFlags::SQLITE_OPEN_READ_ONLY
}
ConnectionType::ReadWrite => {
OpenFlags::SQLITE_OPEN_URI
| OpenFlags::SQLITE_OPEN_NO_MUTEX
| OpenFlags::SQLITE_OPEN_CREATE
| OpenFlags::SQLITE_OPEN_READ_WRITE
}
}
}
}
#[derive(Default, Clone)] #[derive(Default, Clone)]
pub struct Sqlite3Extension { pub struct Sqlite3Extension {
pub library: String, pub library: String,
@@ -98,9 +80,12 @@ impl SuggestDb {
extensions_to_load: &[Sqlite3Extension], extensions_to_load: &[Sqlite3Extension],
type_: ConnectionType, type_: ConnectionType,
) -> Result<Self> { ) -> Result<Self> {
let conn = open_database_with_flags( let conn = open_database::open_database_with_flags(
path, path,
type_.into(), match type_ {
ConnectionType::ReadWrite => open_database::read_write_flags(),
ConnectionType::ReadOnly => open_database::read_only_flags(),
},
&SuggestConnectionInitializer::new(extensions_to_load), &SuggestConnectionInitializer::new(extensions_to_load),
)?; )?;
Ok(Self::with_connection(conn)) Ok(Self::with_connection(conn))

View File

@@ -270,14 +270,8 @@ impl ConnectionInitializer for SuggestConnectionInitializer<'_> {
fn prepare(&self, conn: &Connection, _db_empty: bool) -> open_database::Result<()> { fn prepare(&self, conn: &Connection, _db_empty: bool) -> open_database::Result<()> {
self.load_extensions(conn)?; self.load_extensions(conn)?;
let initial_pragmas = " sql_support::setup_sqlite_defaults(conn)?;
-- Use in-memory storage for TEMP tables. conn.execute("PRAGMA foreign_keys = ON", ())?;
PRAGMA temp_store = 2;
PRAGMA journal_mode = WAL;
PRAGMA foreign_keys = ON;
";
conn.execute_batch(initial_pragmas)?;
sql_support::debug_tools::define_debug_functions(conn)?; sql_support::debug_tools::define_debug_functions(conn)?;
Ok(()) Ok(())
@@ -299,9 +293,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(())
@@ -309,10 +303,10 @@ CREATE TABLE dismissed_suggestions (
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(())
@@ -320,9 +314,9 @@ CREATE TABLE dismissed_suggestions (
18 => { 18 => {
tx.execute_batch( tx.execute_batch(
" "
CREATE TABLE IF NOT EXISTS dismissed_suggestions ( CREATE TABLE IF NOT EXISTS dismissed_suggestions (
url TEXT PRIMARY KEY url TEXT PRIMARY KEY
) WITHOUT ROWID;", ) WITHOUT ROWID;",
)?; )?;
Ok(()) Ok(())
} }
@@ -332,31 +326,31 @@ CREATE TABLE IF NOT EXISTS dismissed_suggestions (
clear_database(tx)?; clear_database(tx)?;
tx.execute_batch( tx.execute_batch(
" "
-- Recreate the various keywords table to drop the foreign keys. -- Recreate the various keywords table to drop the foreign keys.
DROP TABLE keywords; DROP TABLE keywords;
DROP TABLE full_keywords; DROP TABLE full_keywords;
DROP TABLE prefix_keywords; DROP TABLE prefix_keywords;
CREATE TABLE keywords( CREATE TABLE keywords(
keyword TEXT NOT NULL, keyword TEXT NOT NULL,
suggestion_id INTEGER NOT NULL, suggestion_id INTEGER NOT NULL,
full_keyword_id INTEGER NULL, full_keyword_id INTEGER NULL,
rank INTEGER NOT NULL, rank INTEGER NOT NULL,
PRIMARY KEY (keyword, suggestion_id) PRIMARY KEY (keyword, suggestion_id)
) WITHOUT ROWID; ) WITHOUT ROWID;
CREATE TABLE full_keywords( CREATE TABLE full_keywords(
id INTEGER PRIMARY KEY, id INTEGER PRIMARY KEY,
suggestion_id INTEGER NOT NULL, suggestion_id INTEGER NOT NULL,
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, suggestion_id INTEGER NOT NULL,
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);
", ",
)?; )?;
Ok(()) Ok(())
@@ -371,30 +365,30 @@ CREATE UNIQUE INDEX keywords_suggestion_id_rank ON keywords(suggestion_id, rank)
20 => { 20 => {
tx.execute_batch( tx.execute_batch(
" "
CREATE TABLE fakespot_custom_details( CREATE TABLE fakespot_custom_details(
suggestion_id INTEGER PRIMARY KEY, suggestion_id INTEGER PRIMARY KEY,
fakespot_grade TEXT NOT NULL, fakespot_grade TEXT NOT NULL,
product_id TEXT NOT NULL, product_id TEXT NOT NULL,
rating REAL NOT NULL, rating REAL NOT NULL,
total_reviews INTEGER NOT NULL, total_reviews INTEGER NOT NULL,
FOREIGN KEY(suggestion_id) REFERENCES suggestions(id) ON DELETE CASCADE FOREIGN KEY(suggestion_id) REFERENCES suggestions(id) ON DELETE CASCADE
); );
-- Create the Fakespot FTS table. -- Create the Fakespot FTS table.
-- The `tokenize` param is hard to read. The effect is that dashes and apostrophes are -- The `tokenize` param is hard to read. The effect is that dashes and apostrophes are
-- considered valid tokens in a word, rather than separators. -- considered valid tokens in a word, rather than separators.
CREATE VIRTUAL TABLE IF NOT EXISTS fakespot_fts USING FTS5( CREATE VIRTUAL TABLE IF NOT EXISTS fakespot_fts USING FTS5(
title, title,
prefix='4 5 6 7 8 9 10 11', prefix='4 5 6 7 8 9 10 11',
content='', content='',
contentless_delete=1, contentless_delete=1,
tokenize=\"porter unicode61 remove_diacritics 2 tokenchars '''-'\" tokenize=\"porter unicode61 remove_diacritics 2 tokenchars '''-'\"
); );
CREATE TRIGGER fakespot_ai AFTER INSERT ON fakespot_custom_details BEGIN CREATE TRIGGER fakespot_ai AFTER INSERT ON fakespot_custom_details BEGIN
INSERT INTO fakespot_fts(rowid, title) INSERT INTO fakespot_fts(rowid, title)
SELECT id, title SELECT id, title
FROM suggestions FROM suggestions
WHERE id = new.suggestion_id; WHERE id = new.suggestion_id;
END; END;
", ",
)?; )?;
Ok(()) Ok(())
@@ -403,22 +397,22 @@ END;
// Drop and re-create the fakespot_custom_details to add the icon_id column. // Drop and re-create the fakespot_custom_details to add the icon_id column.
tx.execute_batch( tx.execute_batch(
" "
DROP TABLE fakespot_custom_details; DROP TABLE fakespot_custom_details;
CREATE TABLE fakespot_custom_details( CREATE TABLE fakespot_custom_details(
suggestion_id INTEGER PRIMARY KEY, suggestion_id INTEGER PRIMARY KEY,
fakespot_grade TEXT NOT NULL, fakespot_grade TEXT NOT NULL,
product_id TEXT NOT NULL, product_id TEXT NOT NULL,
rating REAL NOT NULL, rating REAL NOT NULL,
total_reviews INTEGER NOT NULL, total_reviews INTEGER NOT NULL,
icon_id TEXT, icon_id TEXT,
FOREIGN KEY(suggestion_id) REFERENCES suggestions(id) ON DELETE CASCADE FOREIGN KEY(suggestion_id) REFERENCES suggestions(id) ON DELETE CASCADE
); );
CREATE TRIGGER fakespot_ai AFTER INSERT ON fakespot_custom_details BEGIN CREATE TRIGGER fakespot_ai AFTER INSERT ON fakespot_custom_details BEGIN
INSERT INTO fakespot_fts(rowid, title) INSERT INTO fakespot_fts(rowid, title)
SELECT id, title SELECT id, title
FROM suggestions FROM suggestions
WHERE id = new.suggestion_id; WHERE id = new.suggestion_id;
END; END;
", ",
)?; )?;
Ok(()) Ok(())
@@ -427,13 +421,13 @@ END;
// Drop and re-create the fakespot_fts table to remove the prefix index param // Drop and re-create the fakespot_fts table to remove the prefix index param
tx.execute_batch( tx.execute_batch(
" "
DROP TABLE fakespot_fts; DROP TABLE fakespot_fts;
CREATE VIRTUAL TABLE fakespot_fts USING FTS5( CREATE VIRTUAL TABLE fakespot_fts USING FTS5(
title, title,
content='', content='',
contentless_delete=1, contentless_delete=1,
tokenize=\"porter unicode61 remove_diacritics 2 tokenchars '''-'\" tokenize=\"porter unicode61 remove_diacritics 2 tokenchars '''-'\"
); );
", ",
)?; )?;
Ok(()) Ok(())
@@ -444,24 +438,24 @@ CREATE VIRTUAL TABLE fakespot_fts USING FTS5(
clear_database(tx)?; clear_database(tx)?;
tx.execute_batch( tx.execute_batch(
" "
DROP TABLE fakespot_custom_details; DROP TABLE fakespot_custom_details;
CREATE TABLE fakespot_custom_details( CREATE TABLE fakespot_custom_details(
suggestion_id INTEGER PRIMARY KEY, suggestion_id INTEGER PRIMARY KEY,
fakespot_grade TEXT NOT NULL, fakespot_grade TEXT NOT NULL,
product_id TEXT NOT NULL, product_id TEXT NOT NULL,
keywords TEXT NOT NULL, keywords TEXT NOT NULL,
product_type TEXT NOT NULL, product_type TEXT NOT NULL,
rating REAL NOT NULL, rating REAL NOT NULL,
total_reviews INTEGER NOT NULL, total_reviews INTEGER NOT NULL,
icon_id TEXT, icon_id TEXT,
FOREIGN KEY(suggestion_id) REFERENCES suggestions(id) ON DELETE CASCADE FOREIGN KEY(suggestion_id) REFERENCES suggestions(id) ON DELETE CASCADE
); );
CREATE TRIGGER fakespot_ai AFTER INSERT ON fakespot_custom_details BEGIN CREATE TRIGGER fakespot_ai AFTER INSERT ON fakespot_custom_details BEGIN
INSERT INTO fakespot_fts(rowid, title) INSERT INTO fakespot_fts(rowid, title)
SELECT id, title SELECT id, title
FROM suggestions FROM suggestions
WHERE id = new.suggestion_id; WHERE id = new.suggestion_id;
END; END;
", ",
)?; )?;
Ok(()) Ok(())
@@ -471,17 +465,17 @@ END;
clear_database(tx)?; clear_database(tx)?;
tx.execute_batch( tx.execute_batch(
" "
CREATE TABLE rs_cache( CREATE TABLE rs_cache(
collection TEXT PRIMARY KEY, collection TEXT PRIMARY KEY,
data TEXT NOT NULL data TEXT NOT NULL
) WITHOUT ROWID; ) WITHOUT ROWID;
CREATE TABLE ingested_records( CREATE TABLE ingested_records(
id TEXT, id TEXT,
collection TEXT, collection TEXT,
type TEXT NOT NULL, type TEXT NOT NULL,
last_modified INTEGER NOT NULL, last_modified INTEGER NOT NULL,
PRIMARY KEY (id, collection) PRIMARY KEY (id, collection)
) WITHOUT ROWID; ) WITHOUT ROWID;
", ",
)?; )?;
Ok(()) Ok(())
@@ -490,12 +484,12 @@ CREATE TABLE ingested_records(
// Create the exposure suggestions table and index. // Create the exposure suggestions table and index.
tx.execute_batch( tx.execute_batch(
" "
CREATE TABLE exposure_custom_details( CREATE TABLE exposure_custom_details(
suggestion_id INTEGER PRIMARY KEY, suggestion_id INTEGER PRIMARY KEY,
type TEXT NOT NULL, type TEXT NOT NULL,
FOREIGN KEY(suggestion_id) REFERENCES suggestions(id) ON DELETE CASCADE FOREIGN KEY(suggestion_id) REFERENCES suggestions(id) ON DELETE CASCADE
); );
CREATE INDEX exposure_custom_details_type ON exposure_custom_details(type); CREATE INDEX exposure_custom_details_type ON exposure_custom_details(type);
", ",
)?; )?;
Ok(()) Ok(())
@@ -504,38 +498,38 @@ CREATE INDEX exposure_custom_details_type ON exposure_custom_details(type);
// Create tables related to city-based weather. // Create tables related to city-based weather.
tx.execute_batch( tx.execute_batch(
" "
CREATE TABLE keywords_metrics( CREATE TABLE keywords_metrics(
record_id TEXT NOT NULL PRIMARY KEY, record_id TEXT NOT NULL PRIMARY KEY,
provider INTEGER NOT NULL, provider INTEGER NOT NULL,
max_length INTEGER NOT NULL, max_length INTEGER NOT NULL,
max_word_count INTEGER NOT NULL max_word_count INTEGER NOT NULL
) WITHOUT ROWID; ) WITHOUT ROWID;
CREATE TABLE geonames( CREATE TABLE geonames(
id INTEGER PRIMARY KEY, id INTEGER PRIMARY KEY,
record_id TEXT NOT NULL, record_id TEXT NOT NULL,
name TEXT NOT NULL, name TEXT NOT NULL,
feature_class TEXT NOT NULL, feature_class TEXT NOT NULL,
feature_code TEXT NOT NULL, feature_code TEXT NOT NULL,
country_code TEXT NOT NULL, country_code TEXT NOT NULL,
admin1_code TEXT NOT NULL, admin1_code TEXT NOT NULL,
population INTEGER population INTEGER
); );
CREATE INDEX geonames_feature_class ON geonames(feature_class); CREATE INDEX geonames_feature_class ON geonames(feature_class);
CREATE INDEX geonames_feature_code ON geonames(feature_code); CREATE INDEX geonames_feature_code ON geonames(feature_code);
CREATE TABLE geonames_alternates( CREATE TABLE geonames_alternates(
name TEXT NOT NULL, name TEXT NOT NULL,
geoname_id INTEGER NOT NULL, geoname_id INTEGER NOT NULL,
PRIMARY KEY (name, geoname_id), PRIMARY KEY (name, geoname_id),
FOREIGN KEY(geoname_id) REFERENCES geonames(id) ON DELETE CASCADE FOREIGN KEY(geoname_id) REFERENCES geonames(id) ON DELETE CASCADE
) WITHOUT ROWID; ) WITHOUT ROWID;
CREATE TABLE geonames_metrics( CREATE TABLE geonames_metrics(
record_id TEXT NOT NULL PRIMARY KEY, record_id TEXT NOT NULL PRIMARY KEY,
max_name_length INTEGER NOT NULL, max_name_length INTEGER NOT NULL,
max_name_word_count INTEGER NOT NULL max_name_word_count INTEGER NOT NULL
) WITHOUT ROWID; ) WITHOUT ROWID;
", ",
)?; )?;
Ok(()) Ok(())
@@ -546,23 +540,23 @@ CREATE TABLE geonames_metrics(
clear_database(tx)?; clear_database(tx)?;
tx.execute_batch( tx.execute_batch(
" "
DROP INDEX geonames_feature_class; DROP INDEX geonames_feature_class;
DROP INDEX geonames_feature_code; DROP INDEX geonames_feature_code;
DROP TABLE geonames; DROP TABLE geonames;
CREATE TABLE geonames( CREATE TABLE geonames(
id INTEGER PRIMARY KEY, id INTEGER PRIMARY KEY,
record_id TEXT NOT NULL, record_id TEXT NOT NULL,
name TEXT NOT NULL, name TEXT NOT NULL,
latitude REAL NOT NULL, latitude REAL NOT NULL,
longitude REAL NOT NULL, longitude REAL NOT NULL,
feature_class TEXT NOT NULL, feature_class TEXT NOT NULL,
feature_code TEXT NOT NULL, feature_code TEXT NOT NULL,
country_code TEXT NOT NULL, country_code TEXT NOT NULL,
admin1_code TEXT NOT NULL, admin1_code TEXT NOT NULL,
population INTEGER NOT NULL population INTEGER NOT NULL
); );
CREATE INDEX geonames_feature_class ON geonames(feature_class); CREATE INDEX geonames_feature_class ON geonames(feature_class);
CREATE INDEX geonames_feature_code ON geonames(feature_code); CREATE INDEX geonames_feature_code ON geonames(feature_code);
", ",
)?; )?;
Ok(()) Ok(())
@@ -573,17 +567,17 @@ CREATE INDEX geonames_feature_code ON geonames(feature_code);
clear_database(tx)?; clear_database(tx)?;
tx.execute_batch( tx.execute_batch(
" "
DROP TABLE geonames_alternates; DROP TABLE geonames_alternates;
CREATE TABLE geonames_alternates( CREATE TABLE geonames_alternates(
name TEXT NOT NULL, name TEXT NOT NULL,
geoname_id INTEGER NOT NULL, geoname_id INTEGER NOT NULL,
-- The value of the `iso_language` field for the alternate. This will be -- The value of the `iso_language` field for the alternate. This will be
-- null for the alternate we artificially create for the `name` in the -- null for the alternate we artificially create for the `name` in the
-- corresponding geoname record. -- corresponding geoname record.
iso_language TEXT, iso_language TEXT,
PRIMARY KEY (name, geoname_id), PRIMARY KEY (name, geoname_id),
FOREIGN KEY(geoname_id) REFERENCES geonames(id) ON DELETE CASCADE FOREIGN KEY(geoname_id) REFERENCES geonames(id) ON DELETE CASCADE
) WITHOUT ROWID; ) WITHOUT ROWID;
", ",
)?; )?;
Ok(()) Ok(())
@@ -600,7 +594,7 @@ CREATE TABLE geonames_alternates(
clear_database(tx)?; clear_database(tx)?;
tx.execute_batch( tx.execute_batch(
" "
CREATE INDEX geonames_alternates_geoname_id ON geonames_alternates(geoname_id); CREATE INDEX geonames_alternates_geoname_id ON geonames_alternates(geoname_id);
", ",
)?; )?;
Ok(()) Ok(())
@@ -610,13 +604,13 @@ CREATE INDEX geonames_alternates_geoname_id ON geonames_alternates(geoname_id);
clear_database(tx)?; clear_database(tx)?;
tx.execute_batch( tx.execute_batch(
" "
CREATE VIRTUAL TABLE IF NOT EXISTS amp_fts USING FTS5( CREATE VIRTUAL TABLE IF NOT EXISTS amp_fts USING FTS5(
full_keywords, full_keywords,
title, title,
content='', content='',
contentless_delete=1, contentless_delete=1,
tokenize=\"porter unicode61 remove_diacritics 2 tokenchars '''-'\" tokenize=\"porter unicode61 remove_diacritics 2 tokenchars '''-'\"
); );
", ",
)?; )?;

View File

@@ -12,7 +12,7 @@ use std::{
use error_support::{breadcrumb, handle_error}; use error_support::{breadcrumb, handle_error};
use once_cell::sync::OnceCell; use once_cell::sync::OnceCell;
use parking_lot::Mutex; use parking_lot::Mutex;
use remote_settings::{self, RemoteSettingsConfig, RemoteSettingsServer}; use remote_settings::{self, RemoteSettingsConfig, RemoteSettingsServer, RemoteSettingsService};
use serde::de::DeserializeOwned; use serde::de::DeserializeOwned;
@@ -80,6 +80,15 @@ impl SuggestStoreBuilder {
self self
} }
pub fn remote_settings_service(
self: Arc<Self>,
_rs_service: Arc<RemoteSettingsService>,
) -> Arc<Self> {
// When #6607 lands, this will set the remote settings service.
// For now, it just exists so we can move consumers over to the new API ahead of time.
self
}
/// Add an sqlite3 extension to load /// Add an sqlite3 extension to load
/// ///
/// library_name should be the name of the library without any extension, for example `libmozsqlite3`. /// library_name should be the name of the library without any extension, for example `libmozsqlite3`.

View File

@@ -1 +1 @@
{"files":{"Cargo.toml":"ff412105cb53a557205b4a88132afb901b69bbfaaca06999b8a6ef06526d2b39","README.md":"6d4ff5b079ac5340d18fa127f583e7ad793c5a2328b8ecd12c3fc723939804f2","build.rs":"aa971160d67ce8626b26e15c04c34b730f594c45c817aae34cfc9f3ea14ae284","src/bso/content.rs":"92935258745bdf0c3915a555cb6884a7fa69faa1290ec2c1815f6e2f3c0f0562","src/bso/crypto.rs":"27602dcccb37d3a55620ee4e16b705da455d49af575de115c7c79c0178eb1d6d","src/bso/mod.rs":"1431db19f3187fad1e4736146e0d2f24826f08b10f8623c0550b4e5a9c86328d","src/bso/test_utils.rs":"4ec5a2df5e1c0ec14dc770681e959bdcef6ef04f6fde435999197f46a8ae4831","src/client/coll_state.rs":"13e6ef55273baf5536acc369be522e34a803a32cabf19cce43e426aea9b6223e","src/client/coll_update.rs":"dac04a90c29dd969f8b4250414609c9b6d61daf2dfa4ae77d1c4a165ba970b05","src/client/collection_keys.rs":"c27b2277a3a52033b58ab01490fc2ea7007494195dd5e6dc2c6931a4ca96795a","src/client/mod.rs":"8f588d4a035cf79d96f2500f06d5651c1a7c566127c456ffa5429811ddce3fd6","src/client/request.rs":"e878c5b43298b6eb682748474963f9fb8d053b4dc690bbb27107f5fa0ee74e01","src/client/state.rs":"4e31193ef2471c1dfabf1c6a391bcb95e14ddb45855786a4194ff187d5c9347c","src/client/status.rs":"f445a8765dac9789444e23b5145148413407bb1d18a15ef56682243997f591bf","src/client/storage_client.rs":"edfb44538b8f8ccb3a38d8942105dde33a6c9cef8abb0c3bdcd91b55bbdda059","src/client/sync.rs":"b29abb512ec9d163f7883b71f78c9202802dcb17cad1fc5dc08087fb0bb66704","src/client/sync_multiple.rs":"67a0e6b9049e5b1b1b248febe392b53eb54bb77e9ddddfba62da975389adf3aa","src/client/token.rs":"13729c693c8be72bcafc816c97e2a35932d008b4f2ccda6a5f8cdb8b2c99a293","src/client/util.rs":"71cc70ee41f821f53078675e636e9fad9c6046fa1a989e37f5487e340a2277d6","src/client_types.rs":"3c3cac1540b92482f43660d9e43bdde8481c4cc1a98253a68c80e791231f5976","src/clients_engine/engine.rs":"31c0b6934152f3921af83dadf5d2b22205f49a501427cd736c62f782595cece3","src/clients_engine/mod.rs":"461729e6f89b66b2cbd89b041a03d4d6a8ba582284ed4f3015cb13e1a0c6da97","src/clients_engine/record.rs":"b0d84bf420743d7638a45e4836633a45e50257d5548fe7ecd04bff4d724439b8","src/clients_engine/ser.rs":"be6a19c45eb8002ff8e7cf746d2f97d9cecd1740f9817a8f1d624825475fd777","src/device_type.rs":"dc2d4296d25e31471c8e68488f1043ff239b902036cd6aea8a686cf79b4ed335","src/enc_payload.rs":"aa3eea7df49b24cd59831680a47c417b73a3e36e6b0f3f4baf14ca66bd68be6b","src/engine/bridged_engine.rs":"b4e3071a0259ac55303364e57f9cd685916b80dc302030bba07790e55ceecb66","src/engine/mod.rs":"d0d031d80fbdd90686c443b8c44720ab2ab0aff2c1106e0fdd7d60c46361fe8b","src/engine/request.rs":"5923025fb9550178339f880a1bf8526d8e853e7a0b2bce6d9d687cc808ac0085","src/engine/sync_engine.rs":"531b35d72ce9e04c3e543c0468c1e450fba2c0dc3d33d68d9b1c0a5c1ad7dd34","src/error.rs":"a45cfe02e6301f473c34678b694943c1a04308b8c292c6e0448bf495194c3b5e","src/key_bundle.rs":"abd0781f3be8c8e7c691f18bb71f3433b633803c48da9794e15ac6301ed60d6c","src/lib.rs":"f59f8817978d943518dfa03ab31fc0f6b1fc72ee9943a97aef1537e2769649f5","src/record_types.rs":"02bb3d352fb808131d298f9b90d9c95b7e9e0138b97c5401f3b9fdacc5562f44","src/server_timestamp.rs":"63916817796e83fe31fbd598bac025dfa71ec9e1808d09073db258c78a3331cd","src/sync15.udl":"464047a67a7877bc671f9f3aca13f3039cf34beb51756bcdb86015d789a8f400","src/telemetry.rs":"f332b3849824db6b131a7c2dfe20f56075c6a66ad72f6697bc283d914126b423","uniffi.toml":"d9a5a5cb0eee5218f5eee4d8d89214cc1d7fb5b49323fd17becdf4adb706a6aa"},"package":null} {"files":{"Cargo.toml":"ff412105cb53a557205b4a88132afb901b69bbfaaca06999b8a6ef06526d2b39","README.md":"6d4ff5b079ac5340d18fa127f583e7ad793c5a2328b8ecd12c3fc723939804f2","build.rs":"aa971160d67ce8626b26e15c04c34b730f594c45c817aae34cfc9f3ea14ae284","src/bso/content.rs":"92935258745bdf0c3915a555cb6884a7fa69faa1290ec2c1815f6e2f3c0f0562","src/bso/crypto.rs":"27602dcccb37d3a55620ee4e16b705da455d49af575de115c7c79c0178eb1d6d","src/bso/mod.rs":"1431db19f3187fad1e4736146e0d2f24826f08b10f8623c0550b4e5a9c86328d","src/bso/test_utils.rs":"4ec5a2df5e1c0ec14dc770681e959bdcef6ef04f6fde435999197f46a8ae4831","src/client/coll_state.rs":"13e6ef55273baf5536acc369be522e34a803a32cabf19cce43e426aea9b6223e","src/client/coll_update.rs":"dac04a90c29dd969f8b4250414609c9b6d61daf2dfa4ae77d1c4a165ba970b05","src/client/collection_keys.rs":"c27b2277a3a52033b58ab01490fc2ea7007494195dd5e6dc2c6931a4ca96795a","src/client/mod.rs":"8f588d4a035cf79d96f2500f06d5651c1a7c566127c456ffa5429811ddce3fd6","src/client/request.rs":"e878c5b43298b6eb682748474963f9fb8d053b4dc690bbb27107f5fa0ee74e01","src/client/state.rs":"738e0d5e57d31bff8adf9441d6ce0bcddd3c1a569c4c579f085e80a5870143c5","src/client/status.rs":"f445a8765dac9789444e23b5145148413407bb1d18a15ef56682243997f591bf","src/client/storage_client.rs":"edfb44538b8f8ccb3a38d8942105dde33a6c9cef8abb0c3bdcd91b55bbdda059","src/client/sync.rs":"b29abb512ec9d163f7883b71f78c9202802dcb17cad1fc5dc08087fb0bb66704","src/client/sync_multiple.rs":"67a0e6b9049e5b1b1b248febe392b53eb54bb77e9ddddfba62da975389adf3aa","src/client/token.rs":"13729c693c8be72bcafc816c97e2a35932d008b4f2ccda6a5f8cdb8b2c99a293","src/client/util.rs":"71cc70ee41f821f53078675e636e9fad9c6046fa1a989e37f5487e340a2277d6","src/client_types.rs":"3c3cac1540b92482f43660d9e43bdde8481c4cc1a98253a68c80e791231f5976","src/clients_engine/engine.rs":"31c0b6934152f3921af83dadf5d2b22205f49a501427cd736c62f782595cece3","src/clients_engine/mod.rs":"461729e6f89b66b2cbd89b041a03d4d6a8ba582284ed4f3015cb13e1a0c6da97","src/clients_engine/record.rs":"b0d84bf420743d7638a45e4836633a45e50257d5548fe7ecd04bff4d724439b8","src/clients_engine/ser.rs":"be6a19c45eb8002ff8e7cf746d2f97d9cecd1740f9817a8f1d624825475fd777","src/device_type.rs":"dc2d4296d25e31471c8e68488f1043ff239b902036cd6aea8a686cf79b4ed335","src/enc_payload.rs":"aa3eea7df49b24cd59831680a47c417b73a3e36e6b0f3f4baf14ca66bd68be6b","src/engine/bridged_engine.rs":"b4e3071a0259ac55303364e57f9cd685916b80dc302030bba07790e55ceecb66","src/engine/mod.rs":"d0d031d80fbdd90686c443b8c44720ab2ab0aff2c1106e0fdd7d60c46361fe8b","src/engine/request.rs":"5923025fb9550178339f880a1bf8526d8e853e7a0b2bce6d9d687cc808ac0085","src/engine/sync_engine.rs":"531b35d72ce9e04c3e543c0468c1e450fba2c0dc3d33d68d9b1c0a5c1ad7dd34","src/error.rs":"a45cfe02e6301f473c34678b694943c1a04308b8c292c6e0448bf495194c3b5e","src/key_bundle.rs":"abd0781f3be8c8e7c691f18bb71f3433b633803c48da9794e15ac6301ed60d6c","src/lib.rs":"f59f8817978d943518dfa03ab31fc0f6b1fc72ee9943a97aef1537e2769649f5","src/record_types.rs":"02bb3d352fb808131d298f9b90d9c95b7e9e0138b97c5401f3b9fdacc5562f44","src/server_timestamp.rs":"63916817796e83fe31fbd598bac025dfa71ec9e1808d09073db258c78a3331cd","src/sync15.udl":"464047a67a7877bc671f9f3aca13f3039cf34beb51756bcdb86015d789a8f400","src/telemetry.rs":"f332b3849824db6b131a7c2dfe20f56075c6a66ad72f6697bc283d914126b423","uniffi.toml":"d9a5a5cb0eee5218f5eee4d8d89214cc1d7fb5b49323fd17becdf4adb706a6aa"},"package":null}

View File

@@ -609,7 +609,7 @@ impl SetupState {
/// cheap to recreate and very bad to use if it is wrong, so we insist on the /// cheap to recreate and very bad to use if it is wrong, so we insist on the
/// *exact* timestamp matching and not a simple "later than" check. /// *exact* timestamp matching and not a simple "later than" check.
fn is_same_timestamp(local: ServerTimestamp, collections: &InfoCollections, key: &str) -> bool { fn is_same_timestamp(local: ServerTimestamp, collections: &InfoCollections, key: &str) -> bool {
collections.get(key).map_or(false, |ts| local == *ts) collections.get(key).is_some_and(|ts| local == *ts)
} }
#[cfg(test)] #[cfg(test)]

View File

@@ -1 +1 @@
{"files":{"Cargo.toml":"5630e526d31d5ce38d812492c4c273a2b56fa993796b69c039f5043822855e0e","README.md":"c48b8f391ef822c4f3971b5f453a1e7b43bea232752d520460d2f04803aead1a","build.rs":"33e61b811b19ed2b58e319cc65d5988bed258d2c4fea2d706301184c59847a0f","src/error.rs":"6e5fd48a3f228d37977881a3657f8635b1b37e3b16d91ac2d8476174172a2a74","src/lib.rs":"5789fc7107c76168c331c175aff4f0b2ac2ba3d65cfa0df0e1d4f8ef0c6eb80c","src/schema.rs":"510218d465c7d26d6b9f342cc33c14ab83044a67561ef924c33dadb060761972","src/storage.rs":"d7ea62359a63b1738100568649cb00ebb035f5044d8b4c0fe5f3803e6f34cc30","src/store.rs":"30d854aa7ad1ee3a3cac683a1ae0b9fb3833c8d90537beafcd3e4b24f6e7c6e8","src/sync/bridge.rs":"18d3a7913a030b598d4b6cbd5b7e2ab4cef4cc7ea964f5bc84d7fb2f28787529","src/sync/engine.rs":"73007423f2a22314a034ac660aa65bd9c50e8aa850c445a66604486280067843","src/sync/mod.rs":"09ba3c87f1174a243bf5aaa481effd18929d54359ceb9b23ccb2c32ee3482f34","src/sync/record.rs":"eef6751c209d039958afbe245ddb006cfdf6b8b6b47f925f69c552b832b87922","src/tabs.udl":"99322a1d49d82fb436a279431f407f5b09c9d277e238a7d6fb270a744ec466af","uniffi.toml":"70a41bac1bbbde7a571f1b023f22636337ca3bffd6891dd67596fe13ab98b2f6"},"package":null} {"files":{"Cargo.toml":"5630e526d31d5ce38d812492c4c273a2b56fa993796b69c039f5043822855e0e","README.md":"c48b8f391ef822c4f3971b5f453a1e7b43bea232752d520460d2f04803aead1a","build.rs":"33e61b811b19ed2b58e319cc65d5988bed258d2c4fea2d706301184c59847a0f","src/error.rs":"6e5fd48a3f228d37977881a3657f8635b1b37e3b16d91ac2d8476174172a2a74","src/lib.rs":"5789fc7107c76168c331c175aff4f0b2ac2ba3d65cfa0df0e1d4f8ef0c6eb80c","src/schema.rs":"510218d465c7d26d6b9f342cc33c14ab83044a67561ef924c33dadb060761972","src/storage.rs":"e3ee12bbaecb754eced07b2f4bcd034b84161c5dcd6dc5cbe62ebc47a92f44d2","src/store.rs":"30d854aa7ad1ee3a3cac683a1ae0b9fb3833c8d90537beafcd3e4b24f6e7c6e8","src/sync/bridge.rs":"18d3a7913a030b598d4b6cbd5b7e2ab4cef4cc7ea964f5bc84d7fb2f28787529","src/sync/engine.rs":"73007423f2a22314a034ac660aa65bd9c50e8aa850c445a66604486280067843","src/sync/mod.rs":"09ba3c87f1174a243bf5aaa481effd18929d54359ceb9b23ccb2c32ee3482f34","src/sync/record.rs":"eef6751c209d039958afbe245ddb006cfdf6b8b6b47f925f69c552b832b87922","src/tabs.udl":"99322a1d49d82fb436a279431f407f5b09c9d277e238a7d6fb270a744ec466af","uniffi.toml":"70a41bac1bbbde7a571f1b023f22636337ca3bffd6891dd67596fe13ab98b2f6"},"package":null}

View File

@@ -340,11 +340,11 @@ impl TabsStorage {
.into_iter() .into_iter()
.map(|mut crt| { .map(|mut crt| {
crt.remote_tabs.retain(|tab| { crt.remote_tabs.retain(|tab| {
// The top level in the url_history is the "active" tab, which we should use
// TODO: probably not the best way to url check
!pending_closures !pending_closures
.get(&crt.client_id) .get(&crt.client_id)
// The top level in the url_history is the "active" tab, which we should use .is_some_and(|urls| urls.contains(&tab.url_history[0]))
// TODO: probably not the best way to url check
.map_or(false, |urls| urls.contains(&tab.url_history[0]))
}); });
crt crt
}) })

View File

@@ -438,7 +438,7 @@ export class RelevancyStore {
* This is non-blocking since databases and other resources are lazily opened. * This is non-blocking since databases and other resources are lazily opened.
* @returns {RelevancyStore} * @returns {RelevancyStore}
*/ */
static init(dbPath) { static init(dbPath,remoteSettingsService = null) {
const liftResult = (result) => FfiConverterTypeRelevancyStore.lift(result); const liftResult = (result) => FfiConverterTypeRelevancyStore.lift(result);
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
@@ -450,9 +450,18 @@ export class RelevancyStore {
} }
throw e; throw e;
} }
try {
FfiConverterOptionalTypeRemoteSettingsService.checkType(remoteSettingsService)
} catch (e) {
if (e instanceof UniFFITypeError) {
e.addItemDescriptionPart("remoteSettingsService");
}
throw e;
}
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
12, // relevancy:uniffi_relevancy_fn_constructor_relevancystore_new 12, // relevancy:uniffi_relevancy_fn_constructor_relevancystore_new
FfiConverterString.lower(dbPath), FfiConverterString.lower(dbPath),
FfiConverterOptionalTypeRemoteSettingsService.lower(remoteSettingsService),
) )
} }
return handleRustResult(functionCall(), liftResult, liftError);} return handleRustResult(functionCall(), liftResult, liftError);}
@@ -1864,6 +1873,43 @@ export class FfiConverterTypeRelevancyApiError extends FfiConverterArrayBuffer {
static errorClass = RelevancyApiError; static errorClass = RelevancyApiError;
} }
// Export the FFIConverter object to make external types work.
export class FfiConverterOptionalTypeRemoteSettingsService extends FfiConverterArrayBuffer {
static checkType(value) {
if (value !== undefined && value !== null) {
FfiConverterTypeRemoteSettingsService.checkType(value)
}
}
static read(dataStream) {
const code = dataStream.readUint8(0);
switch (code) {
case 0:
return null
case 1:
return FfiConverterTypeRemoteSettingsService.read(dataStream)
default:
throw new UniFFIError(`Unexpected code: ${code}`);
}
}
static write(dataStream, value) {
if (value === null || value === undefined) {
dataStream.writeUint8(0);
return;
}
dataStream.writeUint8(1);
FfiConverterTypeRemoteSettingsService.write(dataStream, value)
}
static computeSize(value) {
if (value === null || value === undefined) {
return 1;
}
return 1 + FfiConverterTypeRemoteSettingsService.computeSize(value)
}
}
// Export the FFIConverter object to make external types work. // Export the FFIConverter object to make external types work.
export class FfiConverterSequencestring extends FfiConverterArrayBuffer { export class FfiConverterSequencestring extends FfiConverterArrayBuffer {
static read(dataStream) { static read(dataStream) {
@@ -1952,6 +1998,14 @@ export class FfiConverterSequenceTypeInterest extends FfiConverterArrayBuffer {
} }
} }
import {
FfiConverterTypeRemoteSettingsService,
RemoteSettingsService,
} from "resource://gre/modules/RustRemoteSettings.sys.mjs";
// Export the FFIConverter object to make external types work.
export { FfiConverterTypeRemoteSettingsService, RemoteSettingsService };

View File

@@ -857,7 +857,7 @@ export class RemoteSettingsService {
* Create a new Remote Settings client * Create a new Remote Settings client
* @returns {RemoteSettingsClient} * @returns {RemoteSettingsClient}
*/ */
makeClient(collectionName,appContext) { makeClient(collectionName) {
const liftResult = (result) => FfiConverterTypeRemoteSettingsClient.lift(result); const liftResult = (result) => FfiConverterTypeRemoteSettingsClient.lift(result);
const liftError = (data) => FfiConverterTypeRemoteSettingsError.lift(data); const liftError = (data) => FfiConverterTypeRemoteSettingsError.lift(data);
const functionCall = () => { const functionCall = () => {
@@ -869,19 +869,10 @@ export class RemoteSettingsService {
} }
throw e; throw e;
} }
try {
FfiConverterOptionalTypeRemoteSettingsContext.checkType(appContext)
} catch (e) {
if (e instanceof UniFFITypeError) {
e.addItemDescriptionPart("appContext");
}
throw e;
}
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
21, // remote_settings:uniffi_remote_settings_fn_method_remotesettingsservice_make_client 21, // remote_settings:uniffi_remote_settings_fn_method_remotesettingsservice_make_client
FfiConverterTypeRemoteSettingsService.lower(this), FfiConverterTypeRemoteSettingsService.lower(this),
FfiConverterString.lower(collectionName), FfiConverterString.lower(collectionName),
FfiConverterOptionalTypeRemoteSettingsContext.lower(appContext),
) )
} }
try { try {
@@ -1276,7 +1267,7 @@ export class FfiConverterTypeRemoteSettingsConfig extends FfiConverterArrayBuffe
* name. * name.
*/ */
export class RemoteSettingsConfig2 { export class RemoteSettingsConfig2 {
constructor({ server = null, bucketName = null }) { constructor({ server = null, bucketName = null, appContext = null }) {
try { try {
FfiConverterOptionalTypeRemoteSettingsServer.checkType(server) FfiConverterOptionalTypeRemoteSettingsServer.checkType(server)
} catch (e) { } catch (e) {
@@ -1293,6 +1284,14 @@ export class RemoteSettingsConfig2 {
} }
throw e; throw e;
} }
try {
FfiConverterOptionalTypeRemoteSettingsContext.checkType(appContext)
} catch (e) {
if (e instanceof UniFFITypeError) {
e.addItemDescriptionPart("appContext");
}
throw e;
}
/** /**
* The Remote Settings server to use. Defaults to [RemoteSettingsServer::Prod], * The Remote Settings server to use. Defaults to [RemoteSettingsServer::Prod],
* @type {?RemoteSettingsServer} * @type {?RemoteSettingsServer}
@@ -1303,12 +1302,18 @@ export class RemoteSettingsConfig2 {
* @type {?string} * @type {?string}
*/ */
this.bucketName = bucketName; this.bucketName = bucketName;
/**
* App context to use for JEXL filtering (when the `jexl` feature is present).
* @type {?RemoteSettingsContext}
*/
this.appContext = appContext;
} }
equals(other) { equals(other) {
return ( return (
this.server == other.server && this.server == other.server &&
this.bucketName == other.bucketName this.bucketName == other.bucketName &&
this.appContext == other.appContext
) )
} }
} }
@@ -1319,17 +1324,20 @@ export class FfiConverterTypeRemoteSettingsConfig2 extends FfiConverterArrayBuff
return new RemoteSettingsConfig2({ return new RemoteSettingsConfig2({
server: FfiConverterOptionalTypeRemoteSettingsServer.read(dataStream), server: FfiConverterOptionalTypeRemoteSettingsServer.read(dataStream),
bucketName: FfiConverterOptionalstring.read(dataStream), bucketName: FfiConverterOptionalstring.read(dataStream),
appContext: FfiConverterOptionalTypeRemoteSettingsContext.read(dataStream),
}); });
} }
static write(dataStream, value) { static write(dataStream, value) {
FfiConverterOptionalTypeRemoteSettingsServer.write(dataStream, value.server); FfiConverterOptionalTypeRemoteSettingsServer.write(dataStream, value.server);
FfiConverterOptionalstring.write(dataStream, value.bucketName); FfiConverterOptionalstring.write(dataStream, value.bucketName);
FfiConverterOptionalTypeRemoteSettingsContext.write(dataStream, value.appContext);
} }
static computeSize(value) { static computeSize(value) {
let totalSize = 0; let totalSize = 0;
totalSize += FfiConverterOptionalTypeRemoteSettingsServer.computeSize(value.server); totalSize += FfiConverterOptionalTypeRemoteSettingsServer.computeSize(value.server);
totalSize += FfiConverterOptionalstring.computeSize(value.bucketName); totalSize += FfiConverterOptionalstring.computeSize(value.bucketName);
totalSize += FfiConverterOptionalTypeRemoteSettingsContext.computeSize(value.appContext);
return totalSize return totalSize
} }
@@ -1354,6 +1362,14 @@ export class FfiConverterTypeRemoteSettingsConfig2 extends FfiConverterArrayBuff
} }
throw e; throw e;
} }
try {
FfiConverterOptionalTypeRemoteSettingsContext.checkType(value.appContext);
} catch (e) {
if (e instanceof UniFFITypeError) {
e.addItemDescriptionPart(".appContext");
}
throw e;
}
} }
} }

View File

@@ -286,18 +286,18 @@ const constructUniffiObject = Symbol("constructUniffiObject");
UnitTestObjs.uniffiObjectPtr = uniffiObjectPtr; UnitTestObjs.uniffiObjectPtr = uniffiObjectPtr;
// Export the FFIConverter object to make external types work. // Export the FFIConverter object to make external types work.
export class FfiConverterU8 extends FfiConverter { export class FfiConverterU32 extends FfiConverter {
static checkType(value) { static checkType(value) {
super.checkType(value); super.checkType(value);
if (!Number.isInteger(value)) { if (!Number.isInteger(value)) {
throw new UniFFITypeError(`${value} is not an integer`); throw new UniFFITypeError(`${value} is not an integer`);
} }
if (value < 0 || value > 256) { if (value < 0 || value > 4294967295) {
throw new UniFFITypeError(`${value} exceeds the U8 bounds`); throw new UniFFITypeError(`${value} exceeds the U32 bounds`);
} }
} }
static computeSize(_value) { static computeSize(_value) {
return 1; return 4;
} }
static lift(value) { static lift(value) {
return value; return value;
@@ -306,10 +306,10 @@ export class FfiConverterU8 extends FfiConverter {
return value; return value;
} }
static write(dataStream, value) { static write(dataStream, value) {
dataStream.writeUint8(value) dataStream.writeUint32(value)
} }
static read(dataStream) { static read(dataStream) {
return dataStream.readUint8() return dataStream.readUint32()
} }
} }
@@ -396,7 +396,7 @@ export class SearchEngineSelector {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
28, // search:uniffi_search_fn_constructor_searchengineselector_new 29, // search:uniffi_search_fn_constructor_searchengineselector_new
) )
} }
return handleRustResult(functionCall(), liftResult, liftError);} return handleRustResult(functionCall(), liftResult, liftError);}
@@ -473,6 +473,52 @@ export class SearchEngineSelector {
return handleRustResult(functionCall(), liftResult, liftError); return handleRustResult(functionCall(), liftResult, liftError);
} }
/**
* Sets the RemoteSettingsService to use. The selector will create the
* relevant remote settings client(s) from the service.
*
* # Params:
* - `service`: The remote settings service instance for the application.
* - `options`: The remote settings options to be passed to the client(s).
* - `apply_engine_overrides`: Whether or not to apply overrides from
* `search-config-v2-overrides` to the selected
* engines. Should be false unless the application
* supports the click URL feature.
*/
useRemoteSettingsServer(service,applyEngineOverrides) {
const liftResult = (result) => undefined;
const liftError = (data) => FfiConverterTypeSearchApiError.lift(data);
const functionCall = () => {
try {
FfiConverterTypeRemoteSettingsService.checkType(service)
} catch (e) {
if (e instanceof UniFFITypeError) {
e.addItemDescriptionPart("service");
}
throw e;
}
try {
FfiConverterBool.checkType(applyEngineOverrides)
} catch (e) {
if (e instanceof UniFFITypeError) {
e.addItemDescriptionPart("applyEngineOverrides");
}
throw e;
}
return UniFFIScaffolding.callAsyncWrapper(
28, // search:uniffi_search_fn_method_searchengineselector_use_remote_settings_server
FfiConverterTypeSearchEngineSelector.lower(this),
FfiConverterTypeRemoteSettingsService.lower(service),
FfiConverterBool.lower(applyEngineOverrides),
)
}
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.
@@ -650,9 +696,9 @@ export class FfiConverterTypeJsonEngineUrl extends FfiConverterArrayBuffer {
* Reflects `types::SearchEngineUrls`, but using `EngineUrl`. * Reflects `types::SearchEngineUrls`, but using `EngineUrl`.
*/ */
export class JsonEngineUrls { export class JsonEngineUrls {
constructor({ search, suggestions, trending }) { constructor({ search, suggestions, trending, searchForm }) {
try { try {
FfiConverterTypeJsonEngineUrl.checkType(search) FfiConverterOptionalTypeJsonEngineUrl.checkType(search)
} catch (e) { } catch (e) {
if (e instanceof UniFFITypeError) { if (e instanceof UniFFITypeError) {
e.addItemDescriptionPart("search"); e.addItemDescriptionPart("search");
@@ -675,9 +721,17 @@ export class JsonEngineUrls {
} }
throw e; throw e;
} }
try {
FfiConverterOptionalTypeJsonEngineUrl.checkType(searchForm)
} catch (e) {
if (e instanceof UniFFITypeError) {
e.addItemDescriptionPart("searchForm");
}
throw e;
}
/** /**
* The URL to use for searches. * The URL to use for searches.
* @type {JSONEngineUrl} * @type {?JSONEngineUrl}
*/ */
this.search = search; this.search = search;
/** /**
@@ -690,13 +744,19 @@ export class JsonEngineUrls {
* @type {?JSONEngineUrl} * @type {?JSONEngineUrl}
*/ */
this.trending = trending; this.trending = trending;
/**
* The URL of the search engine homepage.
* @type {?JSONEngineUrl}
*/
this.searchForm = searchForm;
} }
equals(other) { equals(other) {
return ( return (
this.search.equals(other.search) && this.search == other.search &&
this.suggestions == other.suggestions && this.suggestions == other.suggestions &&
this.trending == other.trending this.trending == other.trending &&
this.searchForm == other.searchForm
) )
} }
} }
@@ -705,22 +765,25 @@ export class JsonEngineUrls {
export class FfiConverterTypeJsonEngineUrls extends FfiConverterArrayBuffer { export class FfiConverterTypeJsonEngineUrls extends FfiConverterArrayBuffer {
static read(dataStream) { static read(dataStream) {
return new JsonEngineUrls({ return new JsonEngineUrls({
search: FfiConverterTypeJsonEngineUrl.read(dataStream), search: FfiConverterOptionalTypeJsonEngineUrl.read(dataStream),
suggestions: FfiConverterOptionalTypeJsonEngineUrl.read(dataStream), suggestions: FfiConverterOptionalTypeJsonEngineUrl.read(dataStream),
trending: FfiConverterOptionalTypeJsonEngineUrl.read(dataStream), trending: FfiConverterOptionalTypeJsonEngineUrl.read(dataStream),
searchForm: FfiConverterOptionalTypeJsonEngineUrl.read(dataStream),
}); });
} }
static write(dataStream, value) { static write(dataStream, value) {
FfiConverterTypeJsonEngineUrl.write(dataStream, value.search); FfiConverterOptionalTypeJsonEngineUrl.write(dataStream, value.search);
FfiConverterOptionalTypeJsonEngineUrl.write(dataStream, value.suggestions); FfiConverterOptionalTypeJsonEngineUrl.write(dataStream, value.suggestions);
FfiConverterOptionalTypeJsonEngineUrl.write(dataStream, value.trending); FfiConverterOptionalTypeJsonEngineUrl.write(dataStream, value.trending);
FfiConverterOptionalTypeJsonEngineUrl.write(dataStream, value.searchForm);
} }
static computeSize(value) { static computeSize(value) {
let totalSize = 0; let totalSize = 0;
totalSize += FfiConverterTypeJsonEngineUrl.computeSize(value.search); totalSize += FfiConverterOptionalTypeJsonEngineUrl.computeSize(value.search);
totalSize += FfiConverterOptionalTypeJsonEngineUrl.computeSize(value.suggestions); totalSize += FfiConverterOptionalTypeJsonEngineUrl.computeSize(value.suggestions);
totalSize += FfiConverterOptionalTypeJsonEngineUrl.computeSize(value.trending); totalSize += FfiConverterOptionalTypeJsonEngineUrl.computeSize(value.trending);
totalSize += FfiConverterOptionalTypeJsonEngineUrl.computeSize(value.searchForm);
return totalSize return totalSize
} }
@@ -730,7 +793,7 @@ export class FfiConverterTypeJsonEngineUrls extends FfiConverterArrayBuffer {
throw new UniFFITypeError(`Expected 'JsonEngineUrls', found '${typeof value}'`); throw new UniFFITypeError(`Expected 'JsonEngineUrls', found '${typeof value}'`);
} }
try { try {
FfiConverterTypeJsonEngineUrl.checkType(value.search); FfiConverterOptionalTypeJsonEngineUrl.checkType(value.search);
} catch (e) { } catch (e) {
if (e instanceof UniFFITypeError) { if (e instanceof UniFFITypeError) {
e.addItemDescriptionPart(".search"); e.addItemDescriptionPart(".search");
@@ -753,6 +816,14 @@ export class FfiConverterTypeJsonEngineUrls extends FfiConverterArrayBuffer {
} }
throw e; throw e;
} }
try {
FfiConverterOptionalTypeJsonEngineUrl.checkType(value.searchForm);
} catch (e) {
if (e instanceof UniFFITypeError) {
e.addItemDescriptionPart(".searchForm");
}
throw e;
}
} }
} }
@@ -946,7 +1017,7 @@ export class SearchEngineDefinition {
throw e; throw e;
} }
try { try {
FfiConverterOptionalstring.checkType(telemetrySuffix) FfiConverterString.checkType(telemetrySuffix)
} catch (e) { } catch (e) {
if (e instanceof UniFFITypeError) { if (e instanceof UniFFITypeError) {
e.addItemDescriptionPart("telemetrySuffix"); e.addItemDescriptionPart("telemetrySuffix");
@@ -962,7 +1033,7 @@ export class SearchEngineDefinition {
throw e; throw e;
} }
try { try {
FfiConverterOptionalu8.checkType(orderHint) FfiConverterOptionalu32.checkType(orderHint)
} catch (e) { } catch (e) {
if (e instanceof UniFFITypeError) { if (e instanceof UniFFITypeError) {
e.addItemDescriptionPart("orderHint"); e.addItemDescriptionPart("orderHint");
@@ -1015,8 +1086,9 @@ export class SearchEngineDefinition {
this.partnerCode = partnerCode; this.partnerCode = partnerCode;
/** /**
* Optional suffix that is appended to the search engine identifier * Optional suffix that is appended to the search engine identifier
* following a dash, i.e. `<identifier>-<suffix>` * following a dash, i.e. `<identifier>-<suffix>`. If it is an empty string
* @type {?string} * no dash should be appended.
* @type {string}
*/ */
this.telemetrySuffix = telemetrySuffix; this.telemetrySuffix = telemetrySuffix;
/** /**
@@ -1062,9 +1134,9 @@ export class FfiConverterTypeSearchEngineDefinition extends FfiConverterArrayBuf
name: FfiConverterString.read(dataStream), name: FfiConverterString.read(dataStream),
optional: FfiConverterBool.read(dataStream), optional: FfiConverterBool.read(dataStream),
partnerCode: FfiConverterString.read(dataStream), partnerCode: FfiConverterString.read(dataStream),
telemetrySuffix: FfiConverterOptionalstring.read(dataStream), telemetrySuffix: FfiConverterString.read(dataStream),
urls: FfiConverterTypeSearchEngineUrls.read(dataStream), urls: FfiConverterTypeSearchEngineUrls.read(dataStream),
orderHint: FfiConverterOptionalu8.read(dataStream), orderHint: FfiConverterOptionalu32.read(dataStream),
}); });
} }
static write(dataStream, value) { static write(dataStream, value) {
@@ -1075,9 +1147,9 @@ export class FfiConverterTypeSearchEngineDefinition extends FfiConverterArrayBuf
FfiConverterString.write(dataStream, value.name); FfiConverterString.write(dataStream, value.name);
FfiConverterBool.write(dataStream, value.optional); FfiConverterBool.write(dataStream, value.optional);
FfiConverterString.write(dataStream, value.partnerCode); FfiConverterString.write(dataStream, value.partnerCode);
FfiConverterOptionalstring.write(dataStream, value.telemetrySuffix); FfiConverterString.write(dataStream, value.telemetrySuffix);
FfiConverterTypeSearchEngineUrls.write(dataStream, value.urls); FfiConverterTypeSearchEngineUrls.write(dataStream, value.urls);
FfiConverterOptionalu8.write(dataStream, value.orderHint); FfiConverterOptionalu32.write(dataStream, value.orderHint);
} }
static computeSize(value) { static computeSize(value) {
@@ -1089,9 +1161,9 @@ export class FfiConverterTypeSearchEngineDefinition extends FfiConverterArrayBuf
totalSize += FfiConverterString.computeSize(value.name); totalSize += FfiConverterString.computeSize(value.name);
totalSize += FfiConverterBool.computeSize(value.optional); totalSize += FfiConverterBool.computeSize(value.optional);
totalSize += FfiConverterString.computeSize(value.partnerCode); totalSize += FfiConverterString.computeSize(value.partnerCode);
totalSize += FfiConverterOptionalstring.computeSize(value.telemetrySuffix); totalSize += FfiConverterString.computeSize(value.telemetrySuffix);
totalSize += FfiConverterTypeSearchEngineUrls.computeSize(value.urls); totalSize += FfiConverterTypeSearchEngineUrls.computeSize(value.urls);
totalSize += FfiConverterOptionalu8.computeSize(value.orderHint); totalSize += FfiConverterOptionalu32.computeSize(value.orderHint);
return totalSize return totalSize
} }
@@ -1157,7 +1229,7 @@ export class FfiConverterTypeSearchEngineDefinition extends FfiConverterArrayBuf
throw e; throw e;
} }
try { try {
FfiConverterOptionalstring.checkType(value.telemetrySuffix); FfiConverterString.checkType(value.telemetrySuffix);
} catch (e) { } catch (e) {
if (e instanceof UniFFITypeError) { if (e instanceof UniFFITypeError) {
e.addItemDescriptionPart(".telemetrySuffix"); e.addItemDescriptionPart(".telemetrySuffix");
@@ -1173,7 +1245,7 @@ export class FfiConverterTypeSearchEngineDefinition extends FfiConverterArrayBuf
throw e; throw e;
} }
try { try {
FfiConverterOptionalu8.checkType(value.orderHint); FfiConverterOptionalu32.checkType(value.orderHint);
} catch (e) { } catch (e) {
if (e instanceof UniFFITypeError) { if (e instanceof UniFFITypeError) {
e.addItemDescriptionPart(".orderHint"); e.addItemDescriptionPart(".orderHint");
@@ -1327,7 +1399,7 @@ export class FfiConverterTypeSearchEngineUrl extends FfiConverterArrayBuffer {
* The URLs associated with the search engine. * The URLs associated with the search engine.
*/ */
export class SearchEngineUrls { export class SearchEngineUrls {
constructor({ search, suggestions, trending }) { constructor({ search, suggestions, trending, searchForm }) {
try { try {
FfiConverterTypeSearchEngineUrl.checkType(search) FfiConverterTypeSearchEngineUrl.checkType(search)
} catch (e) { } catch (e) {
@@ -1352,6 +1424,14 @@ export class SearchEngineUrls {
} }
throw e; throw e;
} }
try {
FfiConverterOptionalTypeSearchEngineUrl.checkType(searchForm)
} catch (e) {
if (e instanceof UniFFITypeError) {
e.addItemDescriptionPart("searchForm");
}
throw e;
}
/** /**
* The URL to use for searches. * The URL to use for searches.
* @type {SearchEngineUrl} * @type {SearchEngineUrl}
@@ -1367,13 +1447,19 @@ export class SearchEngineUrls {
* @type {?SearchEngineUrl} * @type {?SearchEngineUrl}
*/ */
this.trending = trending; this.trending = trending;
/**
* The URL of the search engine homepage.
* @type {?SearchEngineUrl}
*/
this.searchForm = searchForm;
} }
equals(other) { equals(other) {
return ( return (
this.search.equals(other.search) && this.search.equals(other.search) &&
this.suggestions == other.suggestions && this.suggestions == other.suggestions &&
this.trending == other.trending this.trending == other.trending &&
this.searchForm == other.searchForm
) )
} }
} }
@@ -1385,12 +1471,14 @@ export class FfiConverterTypeSearchEngineUrls extends FfiConverterArrayBuffer {
search: FfiConverterTypeSearchEngineUrl.read(dataStream), search: FfiConverterTypeSearchEngineUrl.read(dataStream),
suggestions: FfiConverterOptionalTypeSearchEngineUrl.read(dataStream), suggestions: FfiConverterOptionalTypeSearchEngineUrl.read(dataStream),
trending: FfiConverterOptionalTypeSearchEngineUrl.read(dataStream), trending: FfiConverterOptionalTypeSearchEngineUrl.read(dataStream),
searchForm: FfiConverterOptionalTypeSearchEngineUrl.read(dataStream),
}); });
} }
static write(dataStream, value) { static write(dataStream, value) {
FfiConverterTypeSearchEngineUrl.write(dataStream, value.search); FfiConverterTypeSearchEngineUrl.write(dataStream, value.search);
FfiConverterOptionalTypeSearchEngineUrl.write(dataStream, value.suggestions); FfiConverterOptionalTypeSearchEngineUrl.write(dataStream, value.suggestions);
FfiConverterOptionalTypeSearchEngineUrl.write(dataStream, value.trending); FfiConverterOptionalTypeSearchEngineUrl.write(dataStream, value.trending);
FfiConverterOptionalTypeSearchEngineUrl.write(dataStream, value.searchForm);
} }
static computeSize(value) { static computeSize(value) {
@@ -1398,6 +1486,7 @@ export class FfiConverterTypeSearchEngineUrls extends FfiConverterArrayBuffer {
totalSize += FfiConverterTypeSearchEngineUrl.computeSize(value.search); totalSize += FfiConverterTypeSearchEngineUrl.computeSize(value.search);
totalSize += FfiConverterOptionalTypeSearchEngineUrl.computeSize(value.suggestions); totalSize += FfiConverterOptionalTypeSearchEngineUrl.computeSize(value.suggestions);
totalSize += FfiConverterOptionalTypeSearchEngineUrl.computeSize(value.trending); totalSize += FfiConverterOptionalTypeSearchEngineUrl.computeSize(value.trending);
totalSize += FfiConverterOptionalTypeSearchEngineUrl.computeSize(value.searchForm);
return totalSize return totalSize
} }
@@ -1430,6 +1519,14 @@ export class FfiConverterTypeSearchEngineUrls extends FfiConverterArrayBuffer {
} }
throw e; throw e;
} }
try {
FfiConverterOptionalTypeSearchEngineUrl.checkType(value.searchForm);
} catch (e) {
if (e instanceof UniFFITypeError) {
e.addItemDescriptionPart(".searchForm");
}
throw e;
}
} }
} }
@@ -1438,7 +1535,7 @@ export class FfiConverterTypeSearchEngineUrls extends FfiConverterArrayBuffer {
* specified, along with one of value, experiment_config or search_access_point. * specified, along with one of value, experiment_config or search_access_point.
*/ */
export class SearchUrlParam { export class SearchUrlParam {
constructor({ name, value, experimentConfig }) { constructor({ name, value, enterpriseValue, experimentConfig }) {
try { try {
FfiConverterString.checkType(name) FfiConverterString.checkType(name)
} catch (e) { } catch (e) {
@@ -1455,6 +1552,14 @@ export class SearchUrlParam {
} }
throw e; throw e;
} }
try {
FfiConverterOptionalstring.checkType(enterpriseValue)
} catch (e) {
if (e instanceof UniFFITypeError) {
e.addItemDescriptionPart("enterpriseValue");
}
throw e;
}
try { try {
FfiConverterOptionalstring.checkType(experimentConfig) FfiConverterOptionalstring.checkType(experimentConfig)
} catch (e) { } catch (e) {
@@ -1475,6 +1580,11 @@ export class SearchUrlParam {
* @type {?string} * @type {?string}
*/ */
this.value = value; this.value = value;
/**
* Same as value but only used if Services.polices.isEnterprise is true. Overrides other parameters of the same name.
* @type {?string}
*/
this.enterpriseValue = enterpriseValue;
/** /**
* The value for the parameter will be derived from the equivalent experiment * The value for the parameter will be derived from the equivalent experiment
* configuration value. * configuration value.
@@ -1488,6 +1598,7 @@ export class SearchUrlParam {
return ( return (
this.name == other.name && this.name == other.name &&
this.value == other.value && this.value == other.value &&
this.enterpriseValue == other.enterpriseValue &&
this.experimentConfig == other.experimentConfig this.experimentConfig == other.experimentConfig
) )
} }
@@ -1499,12 +1610,14 @@ export class FfiConverterTypeSearchUrlParam extends FfiConverterArrayBuffer {
return new SearchUrlParam({ return new SearchUrlParam({
name: FfiConverterString.read(dataStream), name: FfiConverterString.read(dataStream),
value: FfiConverterOptionalstring.read(dataStream), value: FfiConverterOptionalstring.read(dataStream),
enterpriseValue: FfiConverterOptionalstring.read(dataStream),
experimentConfig: FfiConverterOptionalstring.read(dataStream), experimentConfig: FfiConverterOptionalstring.read(dataStream),
}); });
} }
static write(dataStream, value) { static write(dataStream, value) {
FfiConverterString.write(dataStream, value.name); FfiConverterString.write(dataStream, value.name);
FfiConverterOptionalstring.write(dataStream, value.value); FfiConverterOptionalstring.write(dataStream, value.value);
FfiConverterOptionalstring.write(dataStream, value.enterpriseValue);
FfiConverterOptionalstring.write(dataStream, value.experimentConfig); FfiConverterOptionalstring.write(dataStream, value.experimentConfig);
} }
@@ -1512,6 +1625,7 @@ export class FfiConverterTypeSearchUrlParam extends FfiConverterArrayBuffer {
let totalSize = 0; let totalSize = 0;
totalSize += FfiConverterString.computeSize(value.name); totalSize += FfiConverterString.computeSize(value.name);
totalSize += FfiConverterOptionalstring.computeSize(value.value); totalSize += FfiConverterOptionalstring.computeSize(value.value);
totalSize += FfiConverterOptionalstring.computeSize(value.enterpriseValue);
totalSize += FfiConverterOptionalstring.computeSize(value.experimentConfig); totalSize += FfiConverterOptionalstring.computeSize(value.experimentConfig);
return totalSize return totalSize
} }
@@ -1537,6 +1651,14 @@ export class FfiConverterTypeSearchUrlParam extends FfiConverterArrayBuffer {
} }
throw e; throw e;
} }
try {
FfiConverterOptionalstring.checkType(value.enterpriseValue);
} catch (e) {
if (e instanceof UniFFITypeError) {
e.addItemDescriptionPart(".enterpriseValue");
}
throw e;
}
try { try {
FfiConverterOptionalstring.checkType(value.experimentConfig); FfiConverterOptionalstring.checkType(value.experimentConfig);
} catch (e) { } catch (e) {
@@ -2193,10 +2315,10 @@ export class FfiConverterTypeSearchUpdateChannel extends FfiConverterArrayBuffer
// Export the FFIConverter object to make external types work. // Export the FFIConverter object to make external types work.
export class FfiConverterOptionalu8 extends FfiConverterArrayBuffer { export class FfiConverterOptionalu32 extends FfiConverterArrayBuffer {
static checkType(value) { static checkType(value) {
if (value !== undefined && value !== null) { if (value !== undefined && value !== null) {
FfiConverterU8.checkType(value) FfiConverterU32.checkType(value)
} }
} }
@@ -2206,7 +2328,7 @@ export class FfiConverterOptionalu8 extends FfiConverterArrayBuffer {
case 0: case 0:
return null return null
case 1: case 1:
return FfiConverterU8.read(dataStream) return FfiConverterU32.read(dataStream)
default: default:
throw new UniFFIError(`Unexpected code: ${code}`); throw new UniFFIError(`Unexpected code: ${code}`);
} }
@@ -2218,14 +2340,14 @@ export class FfiConverterOptionalu8 extends FfiConverterArrayBuffer {
return; return;
} }
dataStream.writeUint8(1); dataStream.writeUint8(1);
FfiConverterU8.write(dataStream, value) FfiConverterU32.write(dataStream, value)
} }
static computeSize(value) { static computeSize(value) {
if (value === null || value === undefined) { if (value === null || value === undefined) {
return 1; return 1;
} }
return 1 + FfiConverterU8.computeSize(value) return 1 + FfiConverterU32.computeSize(value)
} }
} }
@@ -2546,6 +2668,14 @@ export class FfiConverterSequenceTypeSearchUrlParam extends FfiConverterArrayBuf
} }
} }
import {
FfiConverterTypeRemoteSettingsService,
RemoteSettingsService,
} from "resource://gre/modules/RustRemoteSettings.sys.mjs";
// Export the FFIConverter object to make external types work.
export { FfiConverterTypeRemoteSettingsService, RemoteSettingsService };

View File

@@ -551,7 +551,7 @@ export class SuggestStore {
throw e; throw e;
} }
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
40, // suggest:uniffi_suggest_fn_constructor_suggeststore_new 41, // suggest:uniffi_suggest_fn_constructor_suggeststore_new
FfiConverterString.lower(path), FfiConverterString.lower(path),
FfiConverterOptionalTypeRemoteSettingsConfig.lower(settingsConfig), FfiConverterOptionalTypeRemoteSettingsConfig.lower(settingsConfig),
) )
@@ -566,7 +566,7 @@ export class SuggestStore {
const liftError = (data) => FfiConverterTypeSuggestApiError.lift(data); const liftError = (data) => FfiConverterTypeSuggestApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
30, // suggest:uniffi_suggest_fn_method_suggeststore_clear 31, // suggest:uniffi_suggest_fn_method_suggeststore_clear
FfiConverterTypeSuggestStore.lower(this), FfiConverterTypeSuggestStore.lower(this),
) )
} }
@@ -585,7 +585,7 @@ export class SuggestStore {
const liftError = (data) => FfiConverterTypeSuggestApiError.lift(data); const liftError = (data) => FfiConverterTypeSuggestApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
31, // suggest:uniffi_suggest_fn_method_suggeststore_clear_dismissed_suggestions 32, // suggest:uniffi_suggest_fn_method_suggeststore_clear_dismissed_suggestions
FfiConverterTypeSuggestStore.lower(this), FfiConverterTypeSuggestStore.lower(this),
) )
} }
@@ -616,7 +616,7 @@ export class SuggestStore {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
32, // suggest:uniffi_suggest_fn_method_suggeststore_dismiss_suggestion 33, // suggest:uniffi_suggest_fn_method_suggeststore_dismiss_suggestion
FfiConverterTypeSuggestStore.lower(this), FfiConverterTypeSuggestStore.lower(this),
FfiConverterString.lower(suggestionUrl), FfiConverterString.lower(suggestionUrl),
) )
@@ -691,7 +691,7 @@ export class SuggestStore {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
33, // suggest:uniffi_suggest_fn_method_suggeststore_fetch_geonames 34, // suggest:uniffi_suggest_fn_method_suggeststore_fetch_geonames
FfiConverterTypeSuggestStore.lower(this), FfiConverterTypeSuggestStore.lower(this),
FfiConverterString.lower(query), FfiConverterString.lower(query),
FfiConverterBool.lower(matchNamePrefix), FfiConverterBool.lower(matchNamePrefix),
@@ -715,7 +715,7 @@ export class SuggestStore {
const liftError = (data) => FfiConverterTypeSuggestApiError.lift(data); const liftError = (data) => FfiConverterTypeSuggestApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
34, // suggest:uniffi_suggest_fn_method_suggeststore_fetch_global_config 35, // suggest:uniffi_suggest_fn_method_suggeststore_fetch_global_config
FfiConverterTypeSuggestStore.lower(this), FfiConverterTypeSuggestStore.lower(this),
) )
} }
@@ -743,7 +743,7 @@ export class SuggestStore {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
35, // suggest:uniffi_suggest_fn_method_suggeststore_fetch_provider_config 36, // suggest:uniffi_suggest_fn_method_suggeststore_fetch_provider_config
FfiConverterTypeSuggestStore.lower(this), FfiConverterTypeSuggestStore.lower(this),
FfiConverterTypeSuggestionProvider.lower(provider), FfiConverterTypeSuggestionProvider.lower(provider),
) )
@@ -772,7 +772,7 @@ export class SuggestStore {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
36, // suggest:uniffi_suggest_fn_method_suggeststore_ingest 37, // suggest:uniffi_suggest_fn_method_suggeststore_ingest
FfiConverterTypeSuggestStore.lower(this), FfiConverterTypeSuggestStore.lower(this),
FfiConverterTypeSuggestIngestionConstraints.lower(constraints), FfiConverterTypeSuggestIngestionConstraints.lower(constraints),
) )
@@ -804,7 +804,7 @@ export class SuggestStore {
throw e; throw e;
} }
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
37, // suggest:uniffi_suggest_fn_method_suggeststore_interrupt 38, // suggest:uniffi_suggest_fn_method_suggeststore_interrupt
FfiConverterTypeSuggestStore.lower(this), FfiConverterTypeSuggestStore.lower(this),
FfiConverterOptionalTypeInterruptKind.lower(kind), FfiConverterOptionalTypeInterruptKind.lower(kind),
) )
@@ -829,7 +829,7 @@ export class SuggestStore {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
38, // suggest:uniffi_suggest_fn_method_suggeststore_query 39, // suggest:uniffi_suggest_fn_method_suggeststore_query
FfiConverterTypeSuggestStore.lower(this), FfiConverterTypeSuggestStore.lower(this),
FfiConverterTypeSuggestionQuery.lower(query), FfiConverterTypeSuggestionQuery.lower(query),
) )
@@ -858,7 +858,7 @@ export class SuggestStore {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
39, // suggest:uniffi_suggest_fn_method_suggeststore_query_with_metrics 40, // suggest:uniffi_suggest_fn_method_suggeststore_query_with_metrics
FfiConverterTypeSuggestStore.lower(this), FfiConverterTypeSuggestStore.lower(this),
FfiConverterTypeSuggestionQuery.lower(query), FfiConverterTypeSuggestionQuery.lower(query),
) )
@@ -929,7 +929,7 @@ export class SuggestStoreBuilder {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
47, // suggest:uniffi_suggest_fn_constructor_suggeststorebuilder_new 49, // suggest:uniffi_suggest_fn_constructor_suggeststorebuilder_new
) )
} }
return handleRustResult(functionCall(), liftResult, liftError);} return handleRustResult(functionCall(), liftResult, liftError);}
@@ -943,7 +943,7 @@ export class SuggestStoreBuilder {
const liftError = (data) => FfiConverterTypeSuggestApiError.lift(data); const liftError = (data) => FfiConverterTypeSuggestApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
41, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_build 42, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_build
FfiConverterTypeSuggestStoreBuilder.lower(this), FfiConverterTypeSuggestStoreBuilder.lower(this),
) )
} }
@@ -967,7 +967,7 @@ export class SuggestStoreBuilder {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
42, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_cache_path 43, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_cache_path
FfiConverterTypeSuggestStoreBuilder.lower(this), FfiConverterTypeSuggestStoreBuilder.lower(this),
FfiConverterString.lower(path), FfiConverterString.lower(path),
) )
@@ -996,7 +996,7 @@ export class SuggestStoreBuilder {
throw e; throw e;
} }
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
43, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_data_path 44, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_data_path
FfiConverterTypeSuggestStoreBuilder.lower(this), FfiConverterTypeSuggestStoreBuilder.lower(this),
FfiConverterString.lower(path), FfiConverterString.lower(path),
) )
@@ -1033,7 +1033,7 @@ export class SuggestStoreBuilder {
throw e; throw e;
} }
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
44, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_load_extension 45, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_load_extension
FfiConverterTypeSuggestStoreBuilder.lower(this), FfiConverterTypeSuggestStoreBuilder.lower(this),
FfiConverterString.lower(library), FfiConverterString.lower(library),
FfiConverterOptionalstring.lower(entryPoint), FfiConverterOptionalstring.lower(entryPoint),
@@ -1059,7 +1059,7 @@ export class SuggestStoreBuilder {
throw e; throw e;
} }
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
45, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_bucket_name 46, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_bucket_name
FfiConverterTypeSuggestStoreBuilder.lower(this), FfiConverterTypeSuggestStoreBuilder.lower(this),
FfiConverterString.lower(bucketName), FfiConverterString.lower(bucketName),
) )
@@ -1084,7 +1084,7 @@ export class SuggestStoreBuilder {
throw e; throw e;
} }
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
46, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_server 47, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_server
FfiConverterTypeSuggestStoreBuilder.lower(this), FfiConverterTypeSuggestStoreBuilder.lower(this),
FfiConverterTypeRemoteSettingsServer.lower(server), FfiConverterTypeRemoteSettingsServer.lower(server),
) )
@@ -1092,6 +1092,35 @@ export class SuggestStoreBuilder {
return handleRustResult(functionCall(), liftResult, liftError); return handleRustResult(functionCall(), liftResult, liftError);
} }
/**
* remoteSettingsService
* @returns {SuggestStoreBuilder}
*/
remoteSettingsService(rsService) {
const liftResult = (result) => FfiConverterTypeSuggestStoreBuilder.lift(result);
const liftError = null;
const functionCall = () => {
try {
FfiConverterTypeRemoteSettingsService.checkType(rsService)
} catch (e) {
if (e instanceof UniFFITypeError) {
e.addItemDescriptionPart("rsService");
}
throw e;
}
return UniFFIScaffolding.callAsyncWrapper(
48, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_service
FfiConverterTypeSuggestStoreBuilder.lower(this),
FfiConverterTypeRemoteSettingsService.lower(rsService),
)
}
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.
@@ -4077,6 +4106,14 @@ import {
// Export the FFIConverter object to make external types work. // Export the FFIConverter object to make external types work.
export { FfiConverterTypeRemoteSettingsServer, RemoteSettingsServer }; export { FfiConverterTypeRemoteSettingsServer, RemoteSettingsServer };
import {
FfiConverterTypeRemoteSettingsService,
RemoteSettingsService,
} from "resource://gre/modules/RustRemoteSettings.sys.mjs";
// Export the FFIConverter object to make external types work.
export { FfiConverterTypeRemoteSettingsService, RemoteSettingsService };
@@ -4109,7 +4146,7 @@ export function rawSuggestionUrlMatches(rawUrl,cookedUrl) {
throw e; throw e;
} }
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
29, // suggest:uniffi_suggest_fn_func_raw_suggestion_url_matches 30, // suggest:uniffi_suggest_fn_func_raw_suggestion_url_matches
FfiConverterString.lower(rawUrl), FfiConverterString.lower(rawUrl),
FfiConverterString.lower(cookedUrl), FfiConverterString.lower(cookedUrl),
) )

View File

@@ -448,7 +448,7 @@ export class RemoteCommandStore {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
48, // tabs:uniffi_tabs_fn_method_remotecommandstore_add_remote_command 50, // tabs:uniffi_tabs_fn_method_remotecommandstore_add_remote_command
FfiConverterTypeRemoteCommandStore.lower(this), FfiConverterTypeRemoteCommandStore.lower(this),
FfiConverterString.lower(deviceId), FfiConverterString.lower(deviceId),
FfiConverterTypeRemoteCommand.lower(command), FfiConverterTypeRemoteCommand.lower(command),
@@ -494,7 +494,7 @@ export class RemoteCommandStore {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
49, // tabs:uniffi_tabs_fn_method_remotecommandstore_add_remote_command_at 51, // tabs:uniffi_tabs_fn_method_remotecommandstore_add_remote_command_at
FfiConverterTypeRemoteCommandStore.lower(this), FfiConverterTypeRemoteCommandStore.lower(this),
FfiConverterString.lower(deviceId), FfiConverterString.lower(deviceId),
FfiConverterTypeRemoteCommand.lower(command), FfiConverterTypeRemoteCommand.lower(command),
@@ -517,7 +517,7 @@ export class RemoteCommandStore {
const liftError = (data) => FfiConverterTypeTabsApiError.lift(data); const liftError = (data) => FfiConverterTypeTabsApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
50, // tabs:uniffi_tabs_fn_method_remotecommandstore_get_unsent_commands 52, // tabs:uniffi_tabs_fn_method_remotecommandstore_get_unsent_commands
FfiConverterTypeRemoteCommandStore.lower(this), FfiConverterTypeRemoteCommandStore.lower(this),
) )
} }
@@ -554,7 +554,7 @@ export class RemoteCommandStore {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
51, // tabs:uniffi_tabs_fn_method_remotecommandstore_remove_remote_command 53, // tabs:uniffi_tabs_fn_method_remotecommandstore_remove_remote_command
FfiConverterTypeRemoteCommandStore.lower(this), FfiConverterTypeRemoteCommandStore.lower(this),
FfiConverterString.lower(deviceId), FfiConverterString.lower(deviceId),
FfiConverterTypeRemoteCommand.lower(command), FfiConverterTypeRemoteCommand.lower(command),
@@ -584,7 +584,7 @@ export class RemoteCommandStore {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
52, // tabs:uniffi_tabs_fn_method_remotecommandstore_set_pending_command_sent 54, // tabs:uniffi_tabs_fn_method_remotecommandstore_set_pending_command_sent
FfiConverterTypeRemoteCommandStore.lower(this), FfiConverterTypeRemoteCommandStore.lower(this),
FfiConverterTypePendingCommand.lower(command), FfiConverterTypePendingCommand.lower(command),
) )
@@ -655,7 +655,7 @@ export class TabsBridgedEngine {
const liftError = (data) => FfiConverterTypeTabsApiError.lift(data); const liftError = (data) => FfiConverterTypeTabsApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
53, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_apply 55, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_apply
FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterTypeTabsBridgedEngine.lower(this),
) )
} }
@@ -683,7 +683,7 @@ export class TabsBridgedEngine {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
54, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_ensure_current_sync_id 56, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_ensure_current_sync_id
FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterTypeTabsBridgedEngine.lower(this),
FfiConverterString.lower(newSyncId), FfiConverterString.lower(newSyncId),
) )
@@ -704,7 +704,7 @@ export class TabsBridgedEngine {
const liftError = (data) => FfiConverterTypeTabsApiError.lift(data); const liftError = (data) => FfiConverterTypeTabsApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
55, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_last_sync 57, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_last_sync
FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterTypeTabsBridgedEngine.lower(this),
) )
} }
@@ -731,7 +731,7 @@ export class TabsBridgedEngine {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
56, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_prepare_for_sync 58, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_prepare_for_sync
FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterTypeTabsBridgedEngine.lower(this),
FfiConverterString.lower(clientData), FfiConverterString.lower(clientData),
) )
@@ -751,7 +751,7 @@ export class TabsBridgedEngine {
const liftError = (data) => FfiConverterTypeTabsApiError.lift(data); const liftError = (data) => FfiConverterTypeTabsApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
57, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_reset 59, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_reset
FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterTypeTabsBridgedEngine.lower(this),
) )
} }
@@ -771,7 +771,7 @@ export class TabsBridgedEngine {
const liftError = (data) => FfiConverterTypeTabsApiError.lift(data); const liftError = (data) => FfiConverterTypeTabsApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
58, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_reset_sync_id 60, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_reset_sync_id
FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterTypeTabsBridgedEngine.lower(this),
) )
} }
@@ -798,7 +798,7 @@ export class TabsBridgedEngine {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
59, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_set_last_sync 61, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_set_last_sync
FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterTypeTabsBridgedEngine.lower(this),
FfiConverterI64.lower(lastSync), FfiConverterI64.lower(lastSync),
) )
@@ -834,7 +834,7 @@ export class TabsBridgedEngine {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
60, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_set_uploaded 62, // 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),
@@ -863,7 +863,7 @@ export class TabsBridgedEngine {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
61, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_store_incoming 63, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_store_incoming
FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterTypeTabsBridgedEngine.lower(this),
FfiConverterSequencestring.lower(incomingEnvelopesAsJson), FfiConverterSequencestring.lower(incomingEnvelopesAsJson),
) )
@@ -883,7 +883,7 @@ export class TabsBridgedEngine {
const liftError = (data) => FfiConverterTypeTabsApiError.lift(data); const liftError = (data) => FfiConverterTypeTabsApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
62, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_finished 64, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_finished
FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterTypeTabsBridgedEngine.lower(this),
) )
} }
@@ -903,7 +903,7 @@ export class TabsBridgedEngine {
const liftError = (data) => FfiConverterTypeTabsApiError.lift(data); const liftError = (data) => FfiConverterTypeTabsApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
63, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_id 65, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_id
FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterTypeTabsBridgedEngine.lower(this),
) )
} }
@@ -922,7 +922,7 @@ export class TabsBridgedEngine {
const liftError = (data) => FfiConverterTypeTabsApiError.lift(data); const liftError = (data) => FfiConverterTypeTabsApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
64, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_started 66, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_started
FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterTypeTabsBridgedEngine.lower(this),
) )
} }
@@ -941,7 +941,7 @@ export class TabsBridgedEngine {
const liftError = (data) => FfiConverterTypeTabsApiError.lift(data); const liftError = (data) => FfiConverterTypeTabsApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
65, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_wipe 67, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_wipe
FfiConverterTypeTabsBridgedEngine.lower(this), FfiConverterTypeTabsBridgedEngine.lower(this),
) )
} }
@@ -1016,7 +1016,7 @@ export class TabsStore {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
72, // tabs:uniffi_tabs_fn_constructor_tabsstore_new 74, // tabs:uniffi_tabs_fn_constructor_tabsstore_new
FfiConverterString.lower(path), FfiConverterString.lower(path),
) )
} }
@@ -1035,7 +1035,7 @@ export class TabsStore {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
66, // tabs:uniffi_tabs_fn_method_tabsstore_bridged_engine 68, // tabs:uniffi_tabs_fn_method_tabsstore_bridged_engine
FfiConverterTypeTabsStore.lower(this), FfiConverterTypeTabsStore.lower(this),
) )
} }
@@ -1054,7 +1054,7 @@ export class TabsStore {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
67, // tabs:uniffi_tabs_fn_method_tabsstore_close_connection 69, // tabs:uniffi_tabs_fn_method_tabsstore_close_connection
FfiConverterTypeTabsStore.lower(this), FfiConverterTypeTabsStore.lower(this),
) )
} }
@@ -1074,7 +1074,7 @@ export class TabsStore {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
68, // tabs:uniffi_tabs_fn_method_tabsstore_get_all 70, // tabs:uniffi_tabs_fn_method_tabsstore_get_all
FfiConverterTypeTabsStore.lower(this), FfiConverterTypeTabsStore.lower(this),
) )
} }
@@ -1094,7 +1094,7 @@ export class TabsStore {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
69, // tabs:uniffi_tabs_fn_method_tabsstore_new_remote_command_store 71, // tabs:uniffi_tabs_fn_method_tabsstore_new_remote_command_store
FfiConverterTypeTabsStore.lower(this), FfiConverterTypeTabsStore.lower(this),
) )
} }
@@ -1113,7 +1113,7 @@ export class TabsStore {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
70, // tabs:uniffi_tabs_fn_method_tabsstore_register_with_sync_manager 72, // tabs:uniffi_tabs_fn_method_tabsstore_register_with_sync_manager
FfiConverterTypeTabsStore.lower(this), FfiConverterTypeTabsStore.lower(this),
) )
} }
@@ -1140,7 +1140,7 @@ export class TabsStore {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
71, // tabs:uniffi_tabs_fn_method_tabsstore_set_local_tabs 73, // tabs:uniffi_tabs_fn_method_tabsstore_set_local_tabs
FfiConverterTypeTabsStore.lower(this), FfiConverterTypeTabsStore.lower(this),
FfiConverterSequenceTypeRemoteTabRecord.lower(remoteTabs), FfiConverterSequenceTypeRemoteTabRecord.lower(remoteTabs),
) )

View File

@@ -417,7 +417,7 @@ export class WebExtStorageBridgedEngine {
const liftError = (data) => FfiConverterTypeWebExtStorageApiError.lift(data); const liftError = (data) => FfiConverterTypeWebExtStorageApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
73, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_apply 75, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_apply
FfiConverterTypeWebExtStorageBridgedEngine.lower(this), FfiConverterTypeWebExtStorageBridgedEngine.lower(this),
) )
} }
@@ -445,7 +445,7 @@ export class WebExtStorageBridgedEngine {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
74, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_ensure_current_sync_id 76, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_ensure_current_sync_id
FfiConverterTypeWebExtStorageBridgedEngine.lower(this), FfiConverterTypeWebExtStorageBridgedEngine.lower(this),
FfiConverterString.lower(newSyncId), FfiConverterString.lower(newSyncId),
) )
@@ -466,7 +466,7 @@ export class WebExtStorageBridgedEngine {
const liftError = (data) => FfiConverterTypeWebExtStorageApiError.lift(data); const liftError = (data) => FfiConverterTypeWebExtStorageApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
75, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_last_sync 77, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_last_sync
FfiConverterTypeWebExtStorageBridgedEngine.lower(this), FfiConverterTypeWebExtStorageBridgedEngine.lower(this),
) )
} }
@@ -493,7 +493,7 @@ export class WebExtStorageBridgedEngine {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
76, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_prepare_for_sync 78, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_prepare_for_sync
FfiConverterTypeWebExtStorageBridgedEngine.lower(this), FfiConverterTypeWebExtStorageBridgedEngine.lower(this),
FfiConverterString.lower(clientData), FfiConverterString.lower(clientData),
) )
@@ -513,7 +513,7 @@ export class WebExtStorageBridgedEngine {
const liftError = (data) => FfiConverterTypeWebExtStorageApiError.lift(data); const liftError = (data) => FfiConverterTypeWebExtStorageApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
77, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_reset 79, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_reset
FfiConverterTypeWebExtStorageBridgedEngine.lower(this), FfiConverterTypeWebExtStorageBridgedEngine.lower(this),
) )
} }
@@ -533,7 +533,7 @@ export class WebExtStorageBridgedEngine {
const liftError = (data) => FfiConverterTypeWebExtStorageApiError.lift(data); const liftError = (data) => FfiConverterTypeWebExtStorageApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
78, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_reset_sync_id 80, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_reset_sync_id
FfiConverterTypeWebExtStorageBridgedEngine.lower(this), FfiConverterTypeWebExtStorageBridgedEngine.lower(this),
) )
} }
@@ -560,7 +560,7 @@ export class WebExtStorageBridgedEngine {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
79, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_set_last_sync 81, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_set_last_sync
FfiConverterTypeWebExtStorageBridgedEngine.lower(this), FfiConverterTypeWebExtStorageBridgedEngine.lower(this),
FfiConverterI64.lower(lastSync), FfiConverterI64.lower(lastSync),
) )
@@ -596,7 +596,7 @@ export class WebExtStorageBridgedEngine {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
80, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_set_uploaded 82, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_set_uploaded
FfiConverterTypeWebExtStorageBridgedEngine.lower(this), FfiConverterTypeWebExtStorageBridgedEngine.lower(this),
FfiConverterI64.lower(serverModifiedMillis), FfiConverterI64.lower(serverModifiedMillis),
FfiConverterSequenceTypeGuid.lower(guids), FfiConverterSequenceTypeGuid.lower(guids),
@@ -625,7 +625,7 @@ export class WebExtStorageBridgedEngine {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
81, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_store_incoming 83, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_store_incoming
FfiConverterTypeWebExtStorageBridgedEngine.lower(this), FfiConverterTypeWebExtStorageBridgedEngine.lower(this),
FfiConverterSequencestring.lower(incoming), FfiConverterSequencestring.lower(incoming),
) )
@@ -645,7 +645,7 @@ export class WebExtStorageBridgedEngine {
const liftError = (data) => FfiConverterTypeWebExtStorageApiError.lift(data); const liftError = (data) => FfiConverterTypeWebExtStorageApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
82, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_sync_finished 84, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_sync_finished
FfiConverterTypeWebExtStorageBridgedEngine.lower(this), FfiConverterTypeWebExtStorageBridgedEngine.lower(this),
) )
} }
@@ -665,7 +665,7 @@ export class WebExtStorageBridgedEngine {
const liftError = (data) => FfiConverterTypeWebExtStorageApiError.lift(data); const liftError = (data) => FfiConverterTypeWebExtStorageApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
83, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_sync_id 85, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_sync_id
FfiConverterTypeWebExtStorageBridgedEngine.lower(this), FfiConverterTypeWebExtStorageBridgedEngine.lower(this),
) )
} }
@@ -684,7 +684,7 @@ export class WebExtStorageBridgedEngine {
const liftError = (data) => FfiConverterTypeWebExtStorageApiError.lift(data); const liftError = (data) => FfiConverterTypeWebExtStorageApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
84, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_sync_started 86, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_sync_started
FfiConverterTypeWebExtStorageBridgedEngine.lower(this), FfiConverterTypeWebExtStorageBridgedEngine.lower(this),
) )
} }
@@ -703,7 +703,7 @@ export class WebExtStorageBridgedEngine {
const liftError = (data) => FfiConverterTypeWebExtStorageApiError.lift(data); const liftError = (data) => FfiConverterTypeWebExtStorageApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
85, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_wipe 87, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_wipe
FfiConverterTypeWebExtStorageBridgedEngine.lower(this), FfiConverterTypeWebExtStorageBridgedEngine.lower(this),
) )
} }
@@ -778,7 +778,7 @@ export class WebExtStorageStore {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
94, // webextstorage:uniffi_webext_storage_fn_constructor_webextstoragestore_new 96, // webextstorage:uniffi_webext_storage_fn_constructor_webextstoragestore_new
FfiConverterString.lower(path), FfiConverterString.lower(path),
) )
} }
@@ -797,7 +797,7 @@ export class WebExtStorageStore {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
86, // webextstorage:uniffi_webext_storage_fn_method_webextstoragestore_bridged_engine 88, // webextstorage:uniffi_webext_storage_fn_method_webextstoragestore_bridged_engine
FfiConverterTypeWebExtStorageStore.lower(this), FfiConverterTypeWebExtStorageStore.lower(this),
) )
} }
@@ -825,7 +825,7 @@ export class WebExtStorageStore {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
87, // webextstorage:uniffi_webext_storage_fn_method_webextstoragestore_clear 89, // webextstorage:uniffi_webext_storage_fn_method_webextstoragestore_clear
FfiConverterTypeWebExtStorageStore.lower(this), FfiConverterTypeWebExtStorageStore.lower(this),
FfiConverterString.lower(extId), FfiConverterString.lower(extId),
) )
@@ -845,7 +845,7 @@ export class WebExtStorageStore {
const liftError = (data) => FfiConverterTypeWebExtStorageApiError.lift(data); const liftError = (data) => FfiConverterTypeWebExtStorageApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
88, // webextstorage:uniffi_webext_storage_fn_method_webextstoragestore_close 90, // webextstorage:uniffi_webext_storage_fn_method_webextstoragestore_close
FfiConverterTypeWebExtStorageStore.lower(this), FfiConverterTypeWebExtStorageStore.lower(this),
) )
} }
@@ -881,7 +881,7 @@ export class WebExtStorageStore {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
89, // webextstorage:uniffi_webext_storage_fn_method_webextstoragestore_get 91, // webextstorage:uniffi_webext_storage_fn_method_webextstoragestore_get
FfiConverterTypeWebExtStorageStore.lower(this), FfiConverterTypeWebExtStorageStore.lower(this),
FfiConverterString.lower(extId), FfiConverterString.lower(extId),
FfiConverterTypeJsonValue.lower(keys), FfiConverterTypeJsonValue.lower(keys),
@@ -919,7 +919,7 @@ export class WebExtStorageStore {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
90, // webextstorage:uniffi_webext_storage_fn_method_webextstoragestore_get_bytes_in_use 92, // webextstorage:uniffi_webext_storage_fn_method_webextstoragestore_get_bytes_in_use
FfiConverterTypeWebExtStorageStore.lower(this), FfiConverterTypeWebExtStorageStore.lower(this),
FfiConverterString.lower(extId), FfiConverterString.lower(extId),
FfiConverterTypeJsonValue.lower(keys), FfiConverterTypeJsonValue.lower(keys),
@@ -941,7 +941,7 @@ export class WebExtStorageStore {
const liftError = (data) => FfiConverterTypeWebExtStorageApiError.lift(data); const liftError = (data) => FfiConverterTypeWebExtStorageApiError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
91, // webextstorage:uniffi_webext_storage_fn_method_webextstoragestore_get_synced_changes 93, // webextstorage:uniffi_webext_storage_fn_method_webextstoragestore_get_synced_changes
FfiConverterTypeWebExtStorageStore.lower(this), FfiConverterTypeWebExtStorageStore.lower(this),
) )
} }
@@ -977,7 +977,7 @@ export class WebExtStorageStore {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
92, // webextstorage:uniffi_webext_storage_fn_method_webextstoragestore_remove 94, // webextstorage:uniffi_webext_storage_fn_method_webextstoragestore_remove
FfiConverterTypeWebExtStorageStore.lower(this), FfiConverterTypeWebExtStorageStore.lower(this),
FfiConverterString.lower(extId), FfiConverterString.lower(extId),
FfiConverterTypeJsonValue.lower(keys), FfiConverterTypeJsonValue.lower(keys),
@@ -1015,7 +1015,7 @@ export class WebExtStorageStore {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
93, // webextstorage:uniffi_webext_storage_fn_method_webextstoragestore_set 95, // webextstorage:uniffi_webext_storage_fn_method_webextstoragestore_set
FfiConverterTypeWebExtStorageStore.lower(this), FfiConverterTypeWebExtStorageStore.lower(this),
FfiConverterString.lower(extId), FfiConverterString.lower(extId),
FfiConverterTypeJsonValue.lower(val), FfiConverterTypeJsonValue.lower(val),

View File

@@ -431,7 +431,7 @@ export function add(a,b) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
95, // arithmetic:uniffi_arithmetical_fn_func_add 97, // arithmetic:uniffi_arithmetical_fn_func_add
FfiConverterU64.lower(a), FfiConverterU64.lower(a),
FfiConverterU64.lower(b), FfiConverterU64.lower(b),
) )
@@ -469,7 +469,7 @@ export function div(dividend,divisor) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
96, // arithmetic:uniffi_arithmetical_fn_func_div 98, // arithmetic:uniffi_arithmetical_fn_func_div
FfiConverterU64.lower(dividend), FfiConverterU64.lower(dividend),
FfiConverterU64.lower(divisor), FfiConverterU64.lower(divisor),
) )
@@ -507,7 +507,7 @@ export function equal(a,b) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
97, // arithmetic:uniffi_arithmetical_fn_func_equal 99, // arithmetic:uniffi_arithmetical_fn_func_equal
FfiConverterU64.lower(a), FfiConverterU64.lower(a),
FfiConverterU64.lower(b), FfiConverterU64.lower(b),
) )
@@ -545,7 +545,7 @@ export function sub(a,b) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
98, // arithmetic:uniffi_arithmetical_fn_func_sub 100, // arithmetic:uniffi_arithmetical_fn_func_sub
FfiConverterU64.lower(a), FfiConverterU64.lower(a),
FfiConverterU64.lower(b), FfiConverterU64.lower(b),
) )

View File

@@ -513,7 +513,7 @@ export function getCustomTypesDemo(demo) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
99, // custom_types:uniffi_uniffi_custom_types_fn_func_get_custom_types_demo 101, // custom_types:uniffi_uniffi_custom_types_fn_func_get_custom_types_demo
FfiConverterOptionalTypeCustomTypesDemo.lower(demo), FfiConverterOptionalTypeCustomTypesDemo.lower(demo),
) )
} }

View File

@@ -437,7 +437,7 @@ export function gradient(value) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
100, // external_types:uniffi_uniffi_fixture_external_types_fn_func_gradient 102, // external_types:uniffi_uniffi_fixture_external_types_fn_func_gradient
FfiConverterOptionalTypeLine.lower(value), FfiConverterOptionalTypeLine.lower(value),
) )
} }
@@ -474,7 +474,7 @@ export function intersection(ln1,ln2) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
101, // external_types:uniffi_uniffi_fixture_external_types_fn_func_intersection 103, // external_types:uniffi_uniffi_fixture_external_types_fn_func_intersection
FfiConverterTypeLine.lower(ln1), FfiConverterTypeLine.lower(ln1),
FfiConverterTypeLine.lower(ln2), FfiConverterTypeLine.lower(ln2),
) )
@@ -503,7 +503,7 @@ export function moveSpriteToOrigin(sprite) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
102, // external_types:uniffi_uniffi_fixture_external_types_fn_func_move_sprite_to_origin 104, // external_types:uniffi_uniffi_fixture_external_types_fn_func_move_sprite_to_origin
FfiConverterTypeSprite.lower(sprite), FfiConverterTypeSprite.lower(sprite),
) )
} }

View File

@@ -737,7 +737,7 @@ export function callLogRepeat(logger,message,count,exclude) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
103, // fixture_callbacks:uniffi_uniffi_fixture_callbacks_fn_func_call_log_repeat 105, // fixture_callbacks:uniffi_uniffi_fixture_callbacks_fn_func_call_log_repeat
FfiConverterTypeLogger.lower(logger), FfiConverterTypeLogger.lower(logger),
FfiConverterString.lower(message), FfiConverterString.lower(message),
FfiConverterU32.lower(count), FfiConverterU32.lower(count),
@@ -776,7 +776,7 @@ export function logEvenNumbers(logger,items) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
104, // fixture_callbacks:uniffi_uniffi_fixture_callbacks_fn_func_log_even_numbers 106, // fixture_callbacks:uniffi_uniffi_fixture_callbacks_fn_func_log_even_numbers
FfiConverterTypeLogger.lower(logger), FfiConverterTypeLogger.lower(logger),
FfiConverterSequencei32.lower(items), FfiConverterSequencei32.lower(items),
) )
@@ -813,7 +813,7 @@ export function logEvenNumbersMainThread(logger,items) {
throw e; throw e;
} }
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
105, // fixture_callbacks:uniffi_uniffi_fixture_callbacks_fn_func_log_even_numbers_main_thread 107, // fixture_callbacks:uniffi_uniffi_fixture_callbacks_fn_func_log_even_numbers_main_thread
FfiConverterTypeLogger.lower(logger), FfiConverterTypeLogger.lower(logger),
FfiConverterSequencei32.lower(items), FfiConverterSequencei32.lower(items),
) )

View File

@@ -662,7 +662,7 @@ export class FutureTester {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
126, // futures:uniffi_uniffi_fixture_futures_fn_constructor_futuretester_init 128, // futures:uniffi_uniffi_fixture_futures_fn_constructor_futuretester_init
) )
} }
return handleRustResult(functionCall(), liftResult, liftError);} return handleRustResult(functionCall(), liftResult, liftError);}
@@ -687,7 +687,7 @@ export class FutureTester {
throw e; throw e;
} }
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
123, // futures:uniffi_uniffi_fixture_futures_fn_method_futuretester_complete_futures 125, // futures:uniffi_uniffi_fixture_futures_fn_method_futuretester_complete_futures
FfiConverterTypeFutureTester.lower(this), FfiConverterTypeFutureTester.lower(this),
FfiConverterU8.lower(value), FfiConverterU8.lower(value),
) )
@@ -704,7 +704,7 @@ export class FutureTester {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
124, // futures:uniffi_uniffi_fixture_futures_fn_method_futuretester_make_future 126, // futures:uniffi_uniffi_fixture_futures_fn_method_futuretester_make_future
FfiConverterTypeFutureTester.lower(this), FfiConverterTypeFutureTester.lower(this),
) )
} }
@@ -724,7 +724,7 @@ export class FutureTester {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
125, // futures:uniffi_uniffi_fixture_futures_fn_method_futuretester_wake_futures 127, // futures:uniffi_uniffi_fixture_futures_fn_method_futuretester_wake_futures
FfiConverterTypeFutureTester.lower(this), FfiConverterTypeFutureTester.lower(this),
) )
} }
@@ -787,7 +787,7 @@ export class RustTask {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
127, // futures:uniffi_uniffi_fixture_futures_fn_method_rusttask_run 129, // futures:uniffi_uniffi_fixture_futures_fn_method_rusttask_run
FfiConverterTypeRustTask.lower(this), FfiConverterTypeRustTask.lower(this),
) )
} }
@@ -858,7 +858,7 @@ export class Traveller {
throw e; throw e;
} }
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
129, // futures:uniffi_uniffi_fixture_futures_fn_constructor_traveller_new 131, // futures:uniffi_uniffi_fixture_futures_fn_constructor_traveller_new
FfiConverterString.lower(name), FfiConverterString.lower(name),
) )
} }
@@ -873,7 +873,7 @@ export class Traveller {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
128, // futures:uniffi_uniffi_fixture_futures_fn_method_traveller_name 130, // futures:uniffi_uniffi_fixture_futures_fn_method_traveller_name
FfiConverterTypeTraveller.lower(this), FfiConverterTypeTraveller.lower(this),
) )
} }
@@ -950,7 +950,7 @@ export class WorkerQueue {
throw e; throw e;
} }
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
130, // futures:uniffi_uniffi_fixture_futures_fn_method_workerqueue_add_task 132, // futures:uniffi_uniffi_fixture_futures_fn_method_workerqueue_add_task
FfiConverterTypeWorkerQueue.lower(this), FfiConverterTypeWorkerQueue.lower(this),
FfiConverterTypeRustTask.lower(task), FfiConverterTypeRustTask.lower(task),
) )
@@ -1104,7 +1104,7 @@ export function expensiveComputation() {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
106, // futures:uniffi_uniffi_fixture_futures_fn_func_expensive_computation 108, // futures:uniffi_uniffi_fixture_futures_fn_func_expensive_computation
) )
} }
try { try {
@@ -1127,7 +1127,7 @@ export function initializeGeckoGlobalWorkerQueue() {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
107, // futures:uniffi_uniffi_fixture_futures_fn_func_initialize_gecko_global_worker_queue 109, // futures:uniffi_uniffi_fixture_futures_fn_func_initialize_gecko_global_worker_queue
) )
} }
return handleRustResult(functionCall(), liftResult, liftError); return handleRustResult(functionCall(), liftResult, liftError);
@@ -1151,7 +1151,7 @@ export function initializeGlobalWorkerQueue(workerQueue) {
throw e; throw e;
} }
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
108, // futures:uniffi_uniffi_fixture_futures_fn_func_initialize_global_worker_queue 110, // futures:uniffi_uniffi_fixture_futures_fn_func_initialize_global_worker_queue
FfiConverterTypeWorkerQueue.lower(workerQueue), FfiConverterTypeWorkerQueue.lower(workerQueue),
) )
} }
@@ -1176,7 +1176,7 @@ export function roundtripF32(v) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
109, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_f32 111, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_f32
FfiConverterF32.lower(v), FfiConverterF32.lower(v),
) )
} }
@@ -1205,7 +1205,7 @@ export function roundtripF64(v) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
110, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_f64 112, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_f64
FfiConverterF64.lower(v), FfiConverterF64.lower(v),
) )
} }
@@ -1234,7 +1234,7 @@ export function roundtripI16(v) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
111, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_i16 113, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_i16
FfiConverterI16.lower(v), FfiConverterI16.lower(v),
) )
} }
@@ -1263,7 +1263,7 @@ export function roundtripI32(v) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
112, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_i32 114, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_i32
FfiConverterI32.lower(v), FfiConverterI32.lower(v),
) )
} }
@@ -1292,7 +1292,7 @@ export function roundtripI64(v) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
113, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_i64 115, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_i64
FfiConverterI64.lower(v), FfiConverterI64.lower(v),
) )
} }
@@ -1321,7 +1321,7 @@ export function roundtripI8(v) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
114, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_i8 116, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_i8
FfiConverterI8.lower(v), FfiConverterI8.lower(v),
) )
} }
@@ -1350,7 +1350,7 @@ export function roundtripMap(v) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
115, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_map 117, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_map
FfiConverterMapStringString.lower(v), FfiConverterMapStringString.lower(v),
) )
} }
@@ -1379,7 +1379,7 @@ export function roundtripObj(v) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
116, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_obj 118, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_obj
FfiConverterTypeTraveller.lower(v), FfiConverterTypeTraveller.lower(v),
) )
} }
@@ -1408,7 +1408,7 @@ export function roundtripString(v) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
117, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_string 119, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_string
FfiConverterString.lower(v), FfiConverterString.lower(v),
) )
} }
@@ -1437,7 +1437,7 @@ export function roundtripU16(v) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
118, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_u16 120, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_u16
FfiConverterU16.lower(v), FfiConverterU16.lower(v),
) )
} }
@@ -1466,7 +1466,7 @@ export function roundtripU32(v) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
119, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_u32 121, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_u32
FfiConverterU32.lower(v), FfiConverterU32.lower(v),
) )
} }
@@ -1495,7 +1495,7 @@ export function roundtripU64(v) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
120, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_u64 122, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_u64
FfiConverterU64.lower(v), FfiConverterU64.lower(v),
) )
} }
@@ -1524,7 +1524,7 @@ export function roundtripU8(v) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
121, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_u8 123, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_u8
FfiConverterU8.lower(v), FfiConverterU8.lower(v),
) )
} }
@@ -1553,7 +1553,7 @@ export function roundtripVec(v) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsync( return UniFFIScaffolding.callAsync(
122, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_vec 124, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_vec
FfiConverterSequenceu32.lower(v), FfiConverterSequenceu32.lower(v),
) )
} }

View File

@@ -542,7 +542,7 @@ export function gradient(ln) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
131, // geometry:uniffi_uniffi_geometry_fn_func_gradient 133, // geometry:uniffi_uniffi_geometry_fn_func_gradient
FfiConverterTypeLine.lower(ln), FfiConverterTypeLine.lower(ln),
) )
} }
@@ -579,7 +579,7 @@ export function intersection(ln1,ln2) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
132, // geometry:uniffi_uniffi_geometry_fn_func_intersection 134, // geometry:uniffi_uniffi_geometry_fn_func_intersection
FfiConverterTypeLine.lower(ln1), FfiConverterTypeLine.lower(ln1),
FfiConverterTypeLine.lower(ln2), FfiConverterTypeLine.lower(ln2),
) )

View File

@@ -371,7 +371,7 @@ export class SingletonObject {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
135, // refcounts:uniffi_uniffi_fixture_refcounts_fn_method_singletonobject_method 137, // refcounts:uniffi_uniffi_fixture_refcounts_fn_method_singletonobject_method
FfiConverterTypeSingletonObject.lower(this), FfiConverterTypeSingletonObject.lower(this),
) )
} }
@@ -423,7 +423,7 @@ export function getJsRefcount() {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
133, // refcounts:uniffi_uniffi_fixture_refcounts_fn_func_get_js_refcount 135, // refcounts:uniffi_uniffi_fixture_refcounts_fn_func_get_js_refcount
) )
} }
return handleRustResult(functionCall(), liftResult, liftError); return handleRustResult(functionCall(), liftResult, liftError);
@@ -439,7 +439,7 @@ export function getSingleton() {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
134, // refcounts:uniffi_uniffi_fixture_refcounts_fn_func_get_singleton 136, // refcounts:uniffi_uniffi_fixture_refcounts_fn_func_get_singleton
) )
} }
return handleRustResult(functionCall(), liftResult, liftError); return handleRustResult(functionCall(), liftResult, liftError);

View File

@@ -665,7 +665,7 @@ export class Optionneur {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
166, // rondpoint:uniffi_uniffi_rondpoint_fn_constructor_optionneur_new 168, // rondpoint:uniffi_uniffi_rondpoint_fn_constructor_optionneur_new
) )
} }
try { try {
@@ -691,7 +691,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
141, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_boolean 143, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_boolean
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterBool.lower(value), FfiConverterBool.lower(value),
) )
@@ -720,7 +720,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
142, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_enum 144, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_enum
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterTypeEnumeration.lower(value), FfiConverterTypeEnumeration.lower(value),
) )
@@ -749,7 +749,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
143, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_f32 145, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_f32
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterF32.lower(value), FfiConverterF32.lower(value),
) )
@@ -778,7 +778,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
144, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_f64 146, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_f64
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterF64.lower(value), FfiConverterF64.lower(value),
) )
@@ -807,7 +807,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
145, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i16_dec 147, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i16_dec
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterI16.lower(value), FfiConverterI16.lower(value),
) )
@@ -836,7 +836,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
146, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i16_hex 148, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i16_hex
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterI16.lower(value), FfiConverterI16.lower(value),
) )
@@ -865,7 +865,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
147, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i32_dec 149, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i32_dec
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterI32.lower(value), FfiConverterI32.lower(value),
) )
@@ -894,7 +894,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
148, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i32_hex 150, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i32_hex
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterI32.lower(value), FfiConverterI32.lower(value),
) )
@@ -923,7 +923,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
149, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i64_dec 151, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i64_dec
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterI64.lower(value), FfiConverterI64.lower(value),
) )
@@ -952,7 +952,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
150, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i64_hex 152, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i64_hex
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterI64.lower(value), FfiConverterI64.lower(value),
) )
@@ -981,7 +981,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
151, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i8_dec 153, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i8_dec
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterI8.lower(value), FfiConverterI8.lower(value),
) )
@@ -1010,7 +1010,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
152, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i8_hex 154, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i8_hex
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterI8.lower(value), FfiConverterI8.lower(value),
) )
@@ -1039,7 +1039,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
153, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_null 155, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_null
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterOptionalstring.lower(value), FfiConverterOptionalstring.lower(value),
) )
@@ -1068,7 +1068,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
154, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_sequence 156, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_sequence
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterSequencestring.lower(value), FfiConverterSequencestring.lower(value),
) )
@@ -1097,7 +1097,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
155, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_string 157, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_string
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterString.lower(value), FfiConverterString.lower(value),
) )
@@ -1126,7 +1126,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
156, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u16_dec 158, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u16_dec
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterU16.lower(value), FfiConverterU16.lower(value),
) )
@@ -1155,7 +1155,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
157, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u16_hex 159, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u16_hex
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterU16.lower(value), FfiConverterU16.lower(value),
) )
@@ -1184,7 +1184,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
158, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u32_dec 160, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u32_dec
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterU32.lower(value), FfiConverterU32.lower(value),
) )
@@ -1213,7 +1213,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
159, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u32_hex 161, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u32_hex
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterU32.lower(value), FfiConverterU32.lower(value),
) )
@@ -1242,7 +1242,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
160, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u32_oct 162, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u32_oct
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterU32.lower(value), FfiConverterU32.lower(value),
) )
@@ -1271,7 +1271,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
161, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u64_dec 163, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u64_dec
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterU64.lower(value), FfiConverterU64.lower(value),
) )
@@ -1300,7 +1300,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
162, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u64_hex 164, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u64_hex
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterU64.lower(value), FfiConverterU64.lower(value),
) )
@@ -1329,7 +1329,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
163, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u8_dec 165, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u8_dec
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterU8.lower(value), FfiConverterU8.lower(value),
) )
@@ -1358,7 +1358,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
164, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u8_hex 166, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u8_hex
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterU8.lower(value), FfiConverterU8.lower(value),
) )
@@ -1387,7 +1387,7 @@ export class Optionneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
165, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_zero 167, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_zero
FfiConverterTypeOptionneur.lower(this), FfiConverterTypeOptionneur.lower(this),
FfiConverterOptionali32.lower(value), FfiConverterOptionali32.lower(value),
) )
@@ -1455,7 +1455,7 @@ export class Retourneur {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
182, // rondpoint:uniffi_uniffi_rondpoint_fn_constructor_retourneur_new 184, // rondpoint:uniffi_uniffi_rondpoint_fn_constructor_retourneur_new
) )
} }
try { try {
@@ -1481,7 +1481,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
167, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_boolean 169, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_boolean
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterBool.lower(value), FfiConverterBool.lower(value),
) )
@@ -1510,7 +1510,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
168, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_double 170, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_double
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterF64.lower(value), FfiConverterF64.lower(value),
) )
@@ -1539,7 +1539,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
169, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_float 171, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_float
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterF32.lower(value), FfiConverterF32.lower(value),
) )
@@ -1568,7 +1568,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
170, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i16 172, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i16
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterI16.lower(value), FfiConverterI16.lower(value),
) )
@@ -1597,7 +1597,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
171, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i32 173, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i32
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterI32.lower(value), FfiConverterI32.lower(value),
) )
@@ -1626,7 +1626,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
172, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i64 174, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i64
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterI64.lower(value), FfiConverterI64.lower(value),
) )
@@ -1655,7 +1655,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
173, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i8 175, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i8
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterI8.lower(value), FfiConverterI8.lower(value),
) )
@@ -1684,7 +1684,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
174, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_nombres 176, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_nombres
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterTypeDictionnaireNombres.lower(value), FfiConverterTypeDictionnaireNombres.lower(value),
) )
@@ -1713,7 +1713,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
175, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_nombres_signes 177, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_nombres_signes
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterTypeDictionnaireNombresSignes.lower(value), FfiConverterTypeDictionnaireNombresSignes.lower(value),
) )
@@ -1742,7 +1742,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
176, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_optionneur_dictionnaire 178, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_optionneur_dictionnaire
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterTypeOptionneurDictionnaire.lower(value), FfiConverterTypeOptionneurDictionnaire.lower(value),
) )
@@ -1771,7 +1771,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
177, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_string 179, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_string
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterString.lower(value), FfiConverterString.lower(value),
) )
@@ -1800,7 +1800,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
178, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u16 180, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u16
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterU16.lower(value), FfiConverterU16.lower(value),
) )
@@ -1829,7 +1829,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
179, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u32 181, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u32
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterU32.lower(value), FfiConverterU32.lower(value),
) )
@@ -1858,7 +1858,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
180, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u64 182, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u64
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterU64.lower(value), FfiConverterU64.lower(value),
) )
@@ -1887,7 +1887,7 @@ export class Retourneur {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
181, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u8 183, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u8
FfiConverterTypeRetourneur.lower(this), FfiConverterTypeRetourneur.lower(this),
FfiConverterU8.lower(value), FfiConverterU8.lower(value),
) )
@@ -1955,7 +1955,7 @@ export class Stringifier {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
195, // rondpoint:uniffi_uniffi_rondpoint_fn_constructor_stringifier_new 197, // rondpoint:uniffi_uniffi_rondpoint_fn_constructor_stringifier_new
) )
} }
try { try {
@@ -1981,7 +1981,7 @@ export class Stringifier {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
183, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_boolean 185, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_boolean
FfiConverterTypeStringifier.lower(this), FfiConverterTypeStringifier.lower(this),
FfiConverterBool.lower(value), FfiConverterBool.lower(value),
) )
@@ -2010,7 +2010,7 @@ export class Stringifier {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
184, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_double 186, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_double
FfiConverterTypeStringifier.lower(this), FfiConverterTypeStringifier.lower(this),
FfiConverterF64.lower(value), FfiConverterF64.lower(value),
) )
@@ -2039,7 +2039,7 @@ export class Stringifier {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
185, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_float 187, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_float
FfiConverterTypeStringifier.lower(this), FfiConverterTypeStringifier.lower(this),
FfiConverterF32.lower(value), FfiConverterF32.lower(value),
) )
@@ -2068,7 +2068,7 @@ export class Stringifier {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
186, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i16 188, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i16
FfiConverterTypeStringifier.lower(this), FfiConverterTypeStringifier.lower(this),
FfiConverterI16.lower(value), FfiConverterI16.lower(value),
) )
@@ -2097,7 +2097,7 @@ export class Stringifier {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
187, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i32 189, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i32
FfiConverterTypeStringifier.lower(this), FfiConverterTypeStringifier.lower(this),
FfiConverterI32.lower(value), FfiConverterI32.lower(value),
) )
@@ -2126,7 +2126,7 @@ export class Stringifier {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
188, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i64 190, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i64
FfiConverterTypeStringifier.lower(this), FfiConverterTypeStringifier.lower(this),
FfiConverterI64.lower(value), FfiConverterI64.lower(value),
) )
@@ -2155,7 +2155,7 @@ export class Stringifier {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
189, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i8 191, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i8
FfiConverterTypeStringifier.lower(this), FfiConverterTypeStringifier.lower(this),
FfiConverterI8.lower(value), FfiConverterI8.lower(value),
) )
@@ -2184,7 +2184,7 @@ export class Stringifier {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
190, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u16 192, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u16
FfiConverterTypeStringifier.lower(this), FfiConverterTypeStringifier.lower(this),
FfiConverterU16.lower(value), FfiConverterU16.lower(value),
) )
@@ -2213,7 +2213,7 @@ export class Stringifier {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
191, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u32 193, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u32
FfiConverterTypeStringifier.lower(this), FfiConverterTypeStringifier.lower(this),
FfiConverterU32.lower(value), FfiConverterU32.lower(value),
) )
@@ -2242,7 +2242,7 @@ export class Stringifier {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
192, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u64 194, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u64
FfiConverterTypeStringifier.lower(this), FfiConverterTypeStringifier.lower(this),
FfiConverterU64.lower(value), FfiConverterU64.lower(value),
) )
@@ -2271,7 +2271,7 @@ export class Stringifier {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
193, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u8 195, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u8
FfiConverterTypeStringifier.lower(this), FfiConverterTypeStringifier.lower(this),
FfiConverterU8.lower(value), FfiConverterU8.lower(value),
) )
@@ -2300,7 +2300,7 @@ export class Stringifier {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
194, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_well_known_string 196, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_well_known_string
FfiConverterTypeStringifier.lower(this), FfiConverterTypeStringifier.lower(this),
FfiConverterString.lower(value), FfiConverterString.lower(value),
) )
@@ -3677,7 +3677,7 @@ export function copieCarte(c) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
136, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_carte 138, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_carte
FfiConverterMapStringTypeEnumerationAvecDonnees.lower(c), FfiConverterMapStringTypeEnumerationAvecDonnees.lower(c),
) )
} }
@@ -3706,7 +3706,7 @@ export function copieDictionnaire(d) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
137, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_dictionnaire 139, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_dictionnaire
FfiConverterTypeDictionnaire.lower(d), FfiConverterTypeDictionnaire.lower(d),
) )
} }
@@ -3735,7 +3735,7 @@ export function copieEnumeration(e) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
138, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_enumeration 140, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_enumeration
FfiConverterTypeEnumeration.lower(e), FfiConverterTypeEnumeration.lower(e),
) )
} }
@@ -3764,7 +3764,7 @@ export function copieEnumerations(e) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
139, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_enumerations 141, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_enumerations
FfiConverterSequenceTypeEnumeration.lower(e), FfiConverterSequenceTypeEnumeration.lower(e),
) )
} }
@@ -3793,7 +3793,7 @@ export function switcheroo(b) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
140, // rondpoint:uniffi_uniffi_rondpoint_fn_func_switcheroo 142, // rondpoint:uniffi_uniffi_rondpoint_fn_func_switcheroo
FfiConverterBool.lower(b), FfiConverterBool.lower(b),
) )
} }

View File

@@ -370,7 +370,7 @@ export class Sprite {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
200, // sprites:uniffi_uniffi_sprites_fn_constructor_sprite_new 202, // sprites:uniffi_uniffi_sprites_fn_constructor_sprite_new
FfiConverterOptionalTypePoint.lower(initialPosition), FfiConverterOptionalTypePoint.lower(initialPosition),
) )
} }
@@ -404,7 +404,7 @@ export class Sprite {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
201, // sprites:uniffi_uniffi_sprites_fn_constructor_sprite_new_relative_to 203, // sprites:uniffi_uniffi_sprites_fn_constructor_sprite_new_relative_to
FfiConverterTypePoint.lower(reference), FfiConverterTypePoint.lower(reference),
FfiConverterTypeVector.lower(direction), FfiConverterTypeVector.lower(direction),
) )
@@ -424,7 +424,7 @@ export class Sprite {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
197, // sprites:uniffi_uniffi_sprites_fn_method_sprite_get_position 199, // sprites:uniffi_uniffi_sprites_fn_method_sprite_get_position
FfiConverterTypeSprite.lower(this), FfiConverterTypeSprite.lower(this),
) )
} }
@@ -451,7 +451,7 @@ export class Sprite {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
198, // sprites:uniffi_uniffi_sprites_fn_method_sprite_move_by 200, // sprites:uniffi_uniffi_sprites_fn_method_sprite_move_by
FfiConverterTypeSprite.lower(this), FfiConverterTypeSprite.lower(this),
FfiConverterTypeVector.lower(direction), FfiConverterTypeVector.lower(direction),
) )
@@ -479,7 +479,7 @@ export class Sprite {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
199, // sprites:uniffi_uniffi_sprites_fn_method_sprite_move_to 201, // sprites:uniffi_uniffi_sprites_fn_method_sprite_move_to
FfiConverterTypeSprite.lower(this), FfiConverterTypeSprite.lower(this),
FfiConverterTypePoint.lower(position), FfiConverterTypePoint.lower(position),
) )
@@ -755,7 +755,7 @@ export function translate(p,v) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
196, // sprites:uniffi_uniffi_sprites_fn_func_translate 198, // sprites:uniffi_uniffi_sprites_fn_func_translate
FfiConverterTypePoint.lower(p), FfiConverterTypePoint.lower(p),
FfiConverterTypeVector.lower(v), FfiConverterTypeVector.lower(v),
) )

View File

@@ -343,7 +343,7 @@ export class TodoList {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
216, // todolist:uniffi_uniffi_todolist_fn_constructor_todolist_new 218, // todolist:uniffi_uniffi_todolist_fn_constructor_todolist_new
) )
} }
try { try {
@@ -368,7 +368,7 @@ export class TodoList {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
205, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_entries 207, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_entries
FfiConverterTypeTodoList.lower(this), FfiConverterTypeTodoList.lower(this),
FfiConverterSequenceTypeTodoEntry.lower(entries), FfiConverterSequenceTypeTodoEntry.lower(entries),
) )
@@ -396,7 +396,7 @@ export class TodoList {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
206, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_entry 208, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_entry
FfiConverterTypeTodoList.lower(this), FfiConverterTypeTodoList.lower(this),
FfiConverterTypeTodoEntry.lower(entry), FfiConverterTypeTodoEntry.lower(entry),
) )
@@ -424,7 +424,7 @@ export class TodoList {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
207, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_item 209, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_item
FfiConverterTypeTodoList.lower(this), FfiConverterTypeTodoList.lower(this),
FfiConverterString.lower(todo), FfiConverterString.lower(todo),
) )
@@ -452,7 +452,7 @@ export class TodoList {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
208, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_items 210, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_items
FfiConverterTypeTodoList.lower(this), FfiConverterTypeTodoList.lower(this),
FfiConverterSequencestring.lower(items), FfiConverterSequencestring.lower(items),
) )
@@ -480,7 +480,7 @@ export class TodoList {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
209, // todolist:uniffi_uniffi_todolist_fn_method_todolist_clear_item 211, // todolist:uniffi_uniffi_todolist_fn_method_todolist_clear_item
FfiConverterTypeTodoList.lower(this), FfiConverterTypeTodoList.lower(this),
FfiConverterString.lower(todo), FfiConverterString.lower(todo),
) )
@@ -501,7 +501,7 @@ export class TodoList {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
210, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_entries 212, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_entries
FfiConverterTypeTodoList.lower(this), FfiConverterTypeTodoList.lower(this),
) )
} }
@@ -521,7 +521,7 @@ export class TodoList {
const liftError = (data) => FfiConverterTypeTodoError.lift(data); const liftError = (data) => FfiConverterTypeTodoError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
211, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_first 213, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_first
FfiConverterTypeTodoList.lower(this), FfiConverterTypeTodoList.lower(this),
) )
} }
@@ -541,7 +541,7 @@ export class TodoList {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
212, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_items 214, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_items
FfiConverterTypeTodoList.lower(this), FfiConverterTypeTodoList.lower(this),
) )
} }
@@ -561,7 +561,7 @@ export class TodoList {
const liftError = (data) => FfiConverterTypeTodoError.lift(data); const liftError = (data) => FfiConverterTypeTodoError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
213, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_last 215, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_last
FfiConverterTypeTodoList.lower(this), FfiConverterTypeTodoList.lower(this),
) )
} }
@@ -581,7 +581,7 @@ export class TodoList {
const liftError = (data) => FfiConverterTypeTodoError.lift(data); const liftError = (data) => FfiConverterTypeTodoError.lift(data);
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
214, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_last_entry 216, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_last_entry
FfiConverterTypeTodoList.lower(this), FfiConverterTypeTodoList.lower(this),
) )
} }
@@ -600,7 +600,7 @@ export class TodoList {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
215, // todolist:uniffi_uniffi_todolist_fn_method_todolist_make_default 217, // todolist:uniffi_uniffi_todolist_fn_method_todolist_make_default
FfiConverterTypeTodoList.lower(this), FfiConverterTypeTodoList.lower(this),
) )
} }
@@ -992,7 +992,7 @@ export function createEntryWith(todo) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
202, // todolist:uniffi_uniffi_todolist_fn_func_create_entry_with 204, // todolist:uniffi_uniffi_todolist_fn_func_create_entry_with
FfiConverterString.lower(todo), FfiConverterString.lower(todo),
) )
} }
@@ -1013,7 +1013,7 @@ export function getDefaultList() {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
203, // todolist:uniffi_uniffi_todolist_fn_func_get_default_list 205, // todolist:uniffi_uniffi_todolist_fn_func_get_default_list
) )
} }
try { try {
@@ -1040,7 +1040,7 @@ export function setDefaultList(list) {
throw e; throw e;
} }
return UniFFIScaffolding.callAsyncWrapper( return UniFFIScaffolding.callAsyncWrapper(
204, // todolist:uniffi_uniffi_todolist_fn_func_set_default_list 206, // todolist:uniffi_uniffi_todolist_fn_func_set_default_list
FfiConverterTypeTodoList.lower(list), FfiConverterTypeTodoList.lower(list),
) )
} }

View File

@@ -388,7 +388,7 @@ export class Calc {
throw e; throw e;
} }
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
219, // uniffi_trait_interfaces:uniffi_uniffi_trait_interfaces_fn_method_calc_add 221, // uniffi_trait_interfaces:uniffi_uniffi_trait_interfaces_fn_method_calc_add
FfiConverterTypeCalc.lower(this), FfiConverterTypeCalc.lower(this),
FfiConverterU32.lower(a), FfiConverterU32.lower(a),
FfiConverterU32.lower(b), FfiConverterU32.lower(b),
@@ -442,7 +442,7 @@ export function makeBuggyCalculator() {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
217, // uniffi_trait_interfaces:uniffi_uniffi_trait_interfaces_fn_func_make_buggy_calculator 219, // uniffi_trait_interfaces:uniffi_uniffi_trait_interfaces_fn_func_make_buggy_calculator
) )
} }
return handleRustResult(functionCall(), liftResult, liftError); return handleRustResult(functionCall(), liftResult, liftError);
@@ -458,7 +458,7 @@ export function makeCalculator() {
const liftError = null; const liftError = null;
const functionCall = () => { const functionCall = () => {
return UniFFIScaffolding.callSync( return UniFFIScaffolding.callSync(
218, // uniffi_trait_interfaces:uniffi_uniffi_trait_interfaces_fn_func_make_calculator 220, // uniffi_trait_interfaces:uniffi_uniffi_trait_interfaces_fn_func_make_calculator
) )
} }
return handleRustResult(functionCall(), liftResult, liftError); return handleRustResult(functionCall(), liftResult, liftError);

View File

@@ -178,7 +178,7 @@ extern "C" {
uint32_t ffi_error_support_uniffi_contract_version(); uint32_t ffi_error_support_uniffi_contract_version();
void* uniffi_relevancy_fn_clone_relevancystore(void*, RustCallStatus*); void* uniffi_relevancy_fn_clone_relevancystore(void*, RustCallStatus*);
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, RustBuffer, RustCallStatus*);
void uniffi_relevancy_fn_method_relevancystore_bandit_init(void*, RustBuffer, RustBuffer, RustCallStatus*); void uniffi_relevancy_fn_method_relevancystore_bandit_init(void*, RustBuffer, RustBuffer, RustCallStatus*);
RustBuffer uniffi_relevancy_fn_method_relevancystore_bandit_select(void*, RustBuffer, RustBuffer, RustCallStatus*); RustBuffer uniffi_relevancy_fn_method_relevancystore_bandit_select(void*, RustBuffer, RustBuffer, RustCallStatus*);
void uniffi_relevancy_fn_method_relevancystore_bandit_update(void*, RustBuffer, RustBuffer, int8_t, RustCallStatus*); void uniffi_relevancy_fn_method_relevancystore_bandit_update(void*, RustBuffer, RustBuffer, int8_t, RustCallStatus*);
@@ -272,7 +272,7 @@ extern "C" {
void* uniffi_remote_settings_fn_clone_remotesettingsservice(void*, RustCallStatus*); void* uniffi_remote_settings_fn_clone_remotesettingsservice(void*, RustCallStatus*);
void uniffi_remote_settings_fn_free_remotesettingsservice(void*, RustCallStatus*); void uniffi_remote_settings_fn_free_remotesettingsservice(void*, RustCallStatus*);
void* uniffi_remote_settings_fn_constructor_remotesettingsservice_new(RustBuffer, RustBuffer, RustCallStatus*); void* uniffi_remote_settings_fn_constructor_remotesettingsservice_new(RustBuffer, RustBuffer, RustCallStatus*);
void* uniffi_remote_settings_fn_method_remotesettingsservice_make_client(void*, RustBuffer, RustBuffer, RustCallStatus*); void* uniffi_remote_settings_fn_method_remotesettingsservice_make_client(void*, RustBuffer, RustCallStatus*);
RustBuffer uniffi_remote_settings_fn_method_remotesettingsservice_sync(void*, RustCallStatus*); RustBuffer uniffi_remote_settings_fn_method_remotesettingsservice_sync(void*, RustCallStatus*);
void uniffi_remote_settings_fn_method_remotesettingsservice_update_config(void*, RustBuffer, RustCallStatus*); void uniffi_remote_settings_fn_method_remotesettingsservice_update_config(void*, RustBuffer, RustCallStatus*);
RustBuffer ffi_remote_settings_rustbuffer_alloc(uint64_t, RustCallStatus*); RustBuffer ffi_remote_settings_rustbuffer_alloc(uint64_t, RustCallStatus*);
@@ -350,6 +350,7 @@ extern "C" {
void uniffi_search_fn_method_searchengineselector_clear_search_config(void*, RustCallStatus*); void uniffi_search_fn_method_searchengineselector_clear_search_config(void*, RustCallStatus*);
RustBuffer uniffi_search_fn_method_searchengineselector_filter_engine_configuration(void*, RustBuffer, RustCallStatus*); RustBuffer uniffi_search_fn_method_searchengineselector_filter_engine_configuration(void*, RustBuffer, RustCallStatus*);
void uniffi_search_fn_method_searchengineselector_set_search_config(void*, RustBuffer, RustCallStatus*); void uniffi_search_fn_method_searchengineselector_set_search_config(void*, RustBuffer, RustCallStatus*);
void uniffi_search_fn_method_searchengineselector_use_remote_settings_server(void*, void*, int8_t, RustCallStatus*);
RustBuffer ffi_search_rustbuffer_alloc(uint64_t, RustCallStatus*); RustBuffer ffi_search_rustbuffer_alloc(uint64_t, RustCallStatus*);
RustBuffer ffi_search_rustbuffer_from_bytes(ForeignBytes, RustCallStatus*); RustBuffer ffi_search_rustbuffer_from_bytes(ForeignBytes, RustCallStatus*);
void ffi_search_rustbuffer_free(RustBuffer, RustCallStatus*); void ffi_search_rustbuffer_free(RustBuffer, RustCallStatus*);
@@ -409,6 +410,7 @@ extern "C" {
uint16_t uniffi_search_checksum_method_searchengineselector_clear_search_config(); uint16_t uniffi_search_checksum_method_searchengineselector_clear_search_config();
uint16_t uniffi_search_checksum_method_searchengineselector_filter_engine_configuration(); uint16_t uniffi_search_checksum_method_searchengineselector_filter_engine_configuration();
uint16_t uniffi_search_checksum_method_searchengineselector_set_search_config(); uint16_t uniffi_search_checksum_method_searchengineselector_set_search_config();
uint16_t uniffi_search_checksum_method_searchengineselector_use_remote_settings_server();
uint16_t uniffi_search_checksum_constructor_searchengineselector_new(); uint16_t uniffi_search_checksum_constructor_searchengineselector_new();
uint32_t ffi_search_uniffi_contract_version(); uint32_t ffi_search_uniffi_contract_version();
void* uniffi_suggest_fn_clone_suggeststore(void*, RustCallStatus*); void* uniffi_suggest_fn_clone_suggeststore(void*, RustCallStatus*);
@@ -433,6 +435,7 @@ extern "C" {
void* uniffi_suggest_fn_method_suggeststorebuilder_load_extension(void*, RustBuffer, RustBuffer, RustCallStatus*); void* uniffi_suggest_fn_method_suggeststorebuilder_load_extension(void*, RustBuffer, RustBuffer, RustCallStatus*);
void* uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_bucket_name(void*, RustBuffer, RustCallStatus*); void* uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_bucket_name(void*, RustBuffer, RustCallStatus*);
void* uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_server(void*, RustBuffer, RustCallStatus*); void* uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_server(void*, RustBuffer, RustCallStatus*);
void* uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_service(void*, void*, 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*);
RustBuffer ffi_suggest_rustbuffer_alloc(uint64_t, RustCallStatus*); RustBuffer ffi_suggest_rustbuffer_alloc(uint64_t, RustCallStatus*);
RustBuffer ffi_suggest_rustbuffer_from_bytes(ForeignBytes, RustCallStatus*); RustBuffer ffi_suggest_rustbuffer_from_bytes(ForeignBytes, RustCallStatus*);
@@ -507,6 +510,7 @@ extern "C" {
uint16_t uniffi_suggest_checksum_method_suggeststorebuilder_load_extension(); uint16_t uniffi_suggest_checksum_method_suggeststorebuilder_load_extension();
uint16_t uniffi_suggest_checksum_method_suggeststorebuilder_remote_settings_bucket_name(); uint16_t uniffi_suggest_checksum_method_suggeststorebuilder_remote_settings_bucket_name();
uint16_t uniffi_suggest_checksum_method_suggeststorebuilder_remote_settings_server(); uint16_t uniffi_suggest_checksum_method_suggeststorebuilder_remote_settings_server();
uint16_t uniffi_suggest_checksum_method_suggeststorebuilder_remote_settings_service();
uint16_t uniffi_suggest_checksum_constructor_suggeststore_new(); uint16_t uniffi_suggest_checksum_constructor_suggeststore_new();
uint16_t uniffi_suggest_checksum_constructor_suggeststorebuilder_new(); uint16_t uniffi_suggest_checksum_constructor_suggeststorebuilder_new();
uint32_t ffi_suggest_uniffi_contract_version(); uint32_t ffi_suggest_uniffi_contract_version();
@@ -2658,6 +2662,7 @@ class ScaffoldingCallHandlerUniffiRelevancyFnConstructorRelevancystoreNew : publ
private: private:
// PrepareRustArgs stores the resulting arguments in these fields // PrepareRustArgs stores the resulting arguments in these fields
typename ScaffoldingConverter<RustBuffer>::IntermediateType mDbPath; typename ScaffoldingConverter<RustBuffer>::IntermediateType mDbPath;
typename ScaffoldingConverter<RustBuffer>::IntermediateType mRemoteSettingsService;
// MakeRustCall stores the result of the call in these fields // MakeRustCall stores the result of the call in these fields
typename ScaffoldingObjectConverter<&kRelevancyRelevancyStorePointerType>::IntermediateType mUniffiReturnValue; typename ScaffoldingObjectConverter<&kRelevancyRelevancyStorePointerType>::IntermediateType mUniffiReturnValue;
@@ -2668,12 +2673,17 @@ public:
if (aError.Failed()) { if (aError.Failed()) {
return; return;
} }
ScaffoldingConverter<RustBuffer>::FromJs(aArgs[1], &mRemoteSettingsService, aError);
if (aError.Failed()) {
return;
}
} }
void MakeRustCall(RustCallStatus* aOutStatus) override { void MakeRustCall(RustCallStatus* aOutStatus) override {
mUniffiReturnValue = ScaffoldingObjectConverter<&kRelevancyRelevancyStorePointerType>::FromRust( mUniffiReturnValue = ScaffoldingObjectConverter<&kRelevancyRelevancyStorePointerType>::FromRust(
uniffi_relevancy_fn_constructor_relevancystore_new( uniffi_relevancy_fn_constructor_relevancystore_new(
ScaffoldingConverter<RustBuffer>::IntoRust(std::move(mDbPath)), ScaffoldingConverter<RustBuffer>::IntoRust(std::move(mDbPath)),
ScaffoldingConverter<RustBuffer>::IntoRust(std::move(mRemoteSettingsService)),
aOutStatus aOutStatus
) )
); );
@@ -2992,7 +3002,6 @@ private:
// PrepareRustArgs stores the resulting arguments in these fields // PrepareRustArgs stores the resulting arguments in these fields
typename ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsServicePointerType>::IntermediateType mPtr; typename ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsServicePointerType>::IntermediateType mPtr;
typename ScaffoldingConverter<RustBuffer>::IntermediateType mCollectionName; typename ScaffoldingConverter<RustBuffer>::IntermediateType mCollectionName;
typename ScaffoldingConverter<RustBuffer>::IntermediateType mAppContext;
// MakeRustCall stores the result of the call in these fields // MakeRustCall stores the result of the call in these fields
typename ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsClientPointerType>::IntermediateType mUniffiReturnValue; typename ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsClientPointerType>::IntermediateType mUniffiReturnValue;
@@ -3007,10 +3016,6 @@ public:
if (aError.Failed()) { if (aError.Failed()) {
return; return;
} }
ScaffoldingConverter<RustBuffer>::FromJs(aArgs[2], &mAppContext, aError);
if (aError.Failed()) {
return;
}
} }
void MakeRustCall(RustCallStatus* aOutStatus) override { void MakeRustCall(RustCallStatus* aOutStatus) override {
@@ -3018,7 +3023,6 @@ public:
uniffi_remote_settings_fn_method_remotesettingsservice_make_client( uniffi_remote_settings_fn_method_remotesettingsservice_make_client(
ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsServicePointerType>::IntoRust(std::move(mPtr)), ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsServicePointerType>::IntoRust(std::move(mPtr)),
ScaffoldingConverter<RustBuffer>::IntoRust(std::move(mCollectionName)), ScaffoldingConverter<RustBuffer>::IntoRust(std::move(mCollectionName)),
ScaffoldingConverter<RustBuffer>::IntoRust(std::move(mAppContext)),
aOutStatus aOutStatus
) )
); );
@@ -3234,6 +3238,43 @@ public:
virtual void ExtractSuccessfulCallResult(JSContext* aCx, dom::Optional<dom::UniFFIScaffoldingValue>& aDest, ErrorResult& aError) override { virtual void ExtractSuccessfulCallResult(JSContext* aCx, dom::Optional<dom::UniFFIScaffoldingValue>& aDest, ErrorResult& aError) override {
} }
}; };
class ScaffoldingCallHandlerUniffiSearchFnMethodSearchengineselectorUseRemoteSettingsServer : public UniffiSyncCallHandler {
private:
// PrepareRustArgs stores the resulting arguments in these fields
typename ScaffoldingObjectConverter<&kSearchSearchEngineSelectorPointerType>::IntermediateType mPtr;
typename ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsServicePointerType>::IntermediateType mService;
typename ScaffoldingConverter<int8_t>::IntermediateType mApplyEngineOverrides;
// MakeRustCall stores the result of the call in these fields
public:
void PrepareRustArgs(const dom::Sequence<dom::UniFFIScaffoldingValue>& aArgs, ErrorResult& aError) override {
ScaffoldingObjectConverter<&kSearchSearchEngineSelectorPointerType>::FromJs(aArgs[0], &mPtr, aError);
if (aError.Failed()) {
return;
}
ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsServicePointerType>::FromJs(aArgs[1], &mService, aError);
if (aError.Failed()) {
return;
}
ScaffoldingConverter<int8_t>::FromJs(aArgs[2], &mApplyEngineOverrides, aError);
if (aError.Failed()) {
return;
}
}
void MakeRustCall(RustCallStatus* aOutStatus) override {
uniffi_search_fn_method_searchengineselector_use_remote_settings_server(
ScaffoldingObjectConverter<&kSearchSearchEngineSelectorPointerType>::IntoRust(std::move(mPtr)),
ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsServicePointerType>::IntoRust(std::move(mService)),
ScaffoldingConverter<int8_t>::IntoRust(std::move(mApplyEngineOverrides)),
aOutStatus
);
}
virtual void ExtractSuccessfulCallResult(JSContext* aCx, dom::Optional<dom::UniFFIScaffoldingValue>& aDest, ErrorResult& aError) override {
}
};
class ScaffoldingCallHandlerUniffiSearchFnConstructorSearchengineselectorNew : public UniffiSyncCallHandler { class ScaffoldingCallHandlerUniffiSearchFnConstructorSearchengineselectorNew : public UniffiSyncCallHandler {
private: private:
// PrepareRustArgs stores the resulting arguments in these fields // PrepareRustArgs stores the resulting arguments in these fields
@@ -3946,6 +3987,46 @@ public:
); );
} }
}; };
class ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststorebuilderRemoteSettingsService : public UniffiSyncCallHandler {
private:
// PrepareRustArgs stores the resulting arguments in these fields
typename ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>::IntermediateType mPtr;
typename ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsServicePointerType>::IntermediateType mRsService;
// MakeRustCall stores the result of the call in these fields
typename ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>::IntermediateType mUniffiReturnValue;
public:
void PrepareRustArgs(const dom::Sequence<dom::UniFFIScaffoldingValue>& aArgs, ErrorResult& aError) override {
ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>::FromJs(aArgs[0], &mPtr, aError);
if (aError.Failed()) {
return;
}
ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsServicePointerType>::FromJs(aArgs[1], &mRsService, aError);
if (aError.Failed()) {
return;
}
}
void MakeRustCall(RustCallStatus* aOutStatus) override {
mUniffiReturnValue = ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>::FromRust(
uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_service(
ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>::IntoRust(std::move(mPtr)),
ScaffoldingObjectConverter<&kRemoteSettingsRemoteSettingsServicePointerType>::IntoRust(std::move(mRsService)),
aOutStatus
)
);
}
virtual void ExtractSuccessfulCallResult(JSContext* aCx, dom::Optional<dom::UniFFIScaffoldingValue>& aDest, ErrorResult& aError) override {
ScaffoldingObjectConverter<&kSuggestSuggestStoreBuilderPointerType>::IntoJs(
aCx,
std::move(mUniffiReturnValue),
&aDest.Construct(),
aError
);
}
};
class ScaffoldingCallHandlerUniffiSuggestFnConstructorSuggeststorebuilderNew : public UniffiSyncCallHandler { class ScaffoldingCallHandlerUniffiSuggestFnConstructorSuggeststorebuilderNew : public UniffiSyncCallHandler {
private: private:
// PrepareRustArgs stores the resulting arguments in these fields // PrepareRustArgs stores the resulting arguments in these fields
@@ -10207,533 +10288,539 @@ UniquePtr<UniffiSyncCallHandler> GetSyncCallHandler(uint64_t aId) {
return MakeUnique<ScaffoldingCallHandlerUniffiSearchFnMethodSearchengineselectorSetSearchConfig>(); return MakeUnique<ScaffoldingCallHandlerUniffiSearchFnMethodSearchengineselectorSetSearchConfig>();
} }
case 28: { case 28: {
return MakeUnique<ScaffoldingCallHandlerUniffiSearchFnConstructorSearchengineselectorNew>(); return MakeUnique<ScaffoldingCallHandlerUniffiSearchFnMethodSearchengineselectorUseRemoteSettingsServer>();
} }
case 29: { case 29: {
return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnFuncRawSuggestionUrlMatches>(); return MakeUnique<ScaffoldingCallHandlerUniffiSearchFnConstructorSearchengineselectorNew>();
} }
case 30: { case 30: {
return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststoreClear>(); return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnFuncRawSuggestionUrlMatches>();
} }
case 31: { case 31: {
return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststoreClearDismissedSuggestions>(); return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststoreClear>();
} }
case 32: { case 32: {
return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststoreDismissSuggestion>(); return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststoreClearDismissedSuggestions>();
} }
case 33: { case 33: {
return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststoreFetchGeonames>(); return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststoreDismissSuggestion>();
} }
case 34: { case 34: {
return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststoreFetchGlobalConfig>(); return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststoreFetchGeonames>();
} }
case 35: { case 35: {
return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststoreFetchProviderConfig>(); return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststoreFetchGlobalConfig>();
} }
case 36: { case 36: {
return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststoreIngest>(); return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststoreFetchProviderConfig>();
} }
case 37: { case 37: {
return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststoreInterrupt>(); return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststoreIngest>();
} }
case 38: { case 38: {
return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststoreQuery>(); return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststoreInterrupt>();
} }
case 39: { case 39: {
return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststoreQueryWithMetrics>(); return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststoreQuery>();
} }
case 40: { case 40: {
return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnConstructorSuggeststoreNew>(); return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststoreQueryWithMetrics>();
} }
case 41: { case 41: {
return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststorebuilderBuild>(); return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnConstructorSuggeststoreNew>();
} }
case 42: { case 42: {
return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststorebuilderCachePath>(); return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststorebuilderBuild>();
} }
case 43: { case 43: {
return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststorebuilderDataPath>(); return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststorebuilderCachePath>();
} }
case 44: { case 44: {
return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststorebuilderLoadExtension>(); return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststorebuilderDataPath>();
} }
case 45: { case 45: {
return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststorebuilderRemoteSettingsBucketName>(); return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststorebuilderLoadExtension>();
} }
case 46: { case 46: {
return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststorebuilderRemoteSettingsServer>(); return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststorebuilderRemoteSettingsBucketName>();
} }
case 47: { case 47: {
return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnConstructorSuggeststorebuilderNew>(); return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststorebuilderRemoteSettingsServer>();
} }
case 48: { case 48: {
return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodRemotecommandstoreAddRemoteCommand>(); return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnMethodSuggeststorebuilderRemoteSettingsService>();
} }
case 49: { case 49: {
return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodRemotecommandstoreAddRemoteCommandAt>(); return MakeUnique<ScaffoldingCallHandlerUniffiSuggestFnConstructorSuggeststorebuilderNew>();
} }
case 50: { case 50: {
return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodRemotecommandstoreGetUnsentCommands>(); return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodRemotecommandstoreAddRemoteCommand>();
} }
case 51: { case 51: {
return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodRemotecommandstoreRemoveRemoteCommand>(); return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodRemotecommandstoreAddRemoteCommandAt>();
} }
case 52: { case 52: {
return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodRemotecommandstoreSetPendingCommandSent>(); return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodRemotecommandstoreGetUnsentCommands>();
} }
case 53: { case 53: {
return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsbridgedengineApply>(); return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodRemotecommandstoreRemoveRemoteCommand>();
} }
case 54: { case 54: {
return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsbridgedengineEnsureCurrentSyncId>(); return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodRemotecommandstoreSetPendingCommandSent>();
} }
case 55: { case 55: {
return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsbridgedengineLastSync>(); return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsbridgedengineApply>();
} }
case 56: { case 56: {
return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsbridgedenginePrepareForSync>(); return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsbridgedengineEnsureCurrentSyncId>();
} }
case 57: { case 57: {
return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsbridgedengineReset>(); return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsbridgedengineLastSync>();
} }
case 58: { case 58: {
return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsbridgedengineResetSyncId>(); return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsbridgedenginePrepareForSync>();
} }
case 59: { case 59: {
return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsbridgedengineSetLastSync>(); return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsbridgedengineReset>();
} }
case 60: { case 60: {
return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsbridgedengineSetUploaded>(); return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsbridgedengineResetSyncId>();
} }
case 61: { case 61: {
return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsbridgedengineStoreIncoming>(); return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsbridgedengineSetLastSync>();
} }
case 62: { case 62: {
return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsbridgedengineSyncFinished>(); return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsbridgedengineSetUploaded>();
} }
case 63: { case 63: {
return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsbridgedengineSyncId>(); return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsbridgedengineStoreIncoming>();
} }
case 64: { case 64: {
return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsbridgedengineSyncStarted>(); return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsbridgedengineSyncFinished>();
} }
case 65: { case 65: {
return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsbridgedengineWipe>(); return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsbridgedengineSyncId>();
} }
case 66: { case 66: {
return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsstoreBridgedEngine>(); return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsbridgedengineSyncStarted>();
} }
case 67: { case 67: {
return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsstoreCloseConnection>(); return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsbridgedengineWipe>();
} }
case 68: { case 68: {
return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsstoreGetAll>(); return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsstoreBridgedEngine>();
} }
case 69: { case 69: {
return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsstoreNewRemoteCommandStore>(); return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsstoreCloseConnection>();
} }
case 70: { case 70: {
return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsstoreRegisterWithSyncManager>(); return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsstoreGetAll>();
} }
case 71: { case 71: {
return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsstoreSetLocalTabs>(); return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsstoreNewRemoteCommandStore>();
} }
case 72: { case 72: {
return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnConstructorTabsstoreNew>(); return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsstoreRegisterWithSyncManager>();
} }
case 73: { case 73: {
return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragebridgedengineApply>(); return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnMethodTabsstoreSetLocalTabs>();
} }
case 74: { case 74: {
return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragebridgedengineEnsureCurrentSyncId>(); return MakeUnique<ScaffoldingCallHandlerUniffiTabsFnConstructorTabsstoreNew>();
} }
case 75: { case 75: {
return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragebridgedengineLastSync>(); return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragebridgedengineApply>();
} }
case 76: { case 76: {
return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragebridgedenginePrepareForSync>(); return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragebridgedengineEnsureCurrentSyncId>();
} }
case 77: { case 77: {
return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragebridgedengineReset>(); return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragebridgedengineLastSync>();
} }
case 78: { case 78: {
return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragebridgedengineResetSyncId>(); return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragebridgedenginePrepareForSync>();
} }
case 79: { case 79: {
return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragebridgedengineSetLastSync>(); return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragebridgedengineReset>();
} }
case 80: { case 80: {
return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragebridgedengineSetUploaded>(); return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragebridgedengineResetSyncId>();
} }
case 81: { case 81: {
return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragebridgedengineStoreIncoming>(); return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragebridgedengineSetLastSync>();
} }
case 82: { case 82: {
return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragebridgedengineSyncFinished>(); return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragebridgedengineSetUploaded>();
} }
case 83: { case 83: {
return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragebridgedengineSyncId>(); return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragebridgedengineStoreIncoming>();
} }
case 84: { case 84: {
return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragebridgedengineSyncStarted>(); return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragebridgedengineSyncFinished>();
} }
case 85: { case 85: {
return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragebridgedengineWipe>(); return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragebridgedengineSyncId>();
} }
case 86: { case 86: {
return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragestoreBridgedEngine>(); return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragebridgedengineSyncStarted>();
} }
case 87: { case 87: {
return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragestoreClear>(); return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragebridgedengineWipe>();
} }
case 88: { case 88: {
return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragestoreClose>(); return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragestoreBridgedEngine>();
} }
case 89: { case 89: {
return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragestoreGet>(); return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragestoreClear>();
} }
case 90: { case 90: {
return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragestoreGetBytesInUse>(); return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragestoreClose>();
} }
case 91: { case 91: {
return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragestoreGetSyncedChanges>(); return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragestoreGet>();
} }
case 92: { case 92: {
return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragestoreRemove>(); return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragestoreGetBytesInUse>();
} }
case 93: { case 93: {
return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragestoreSet>(); return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragestoreGetSyncedChanges>();
} }
case 94: { case 94: {
return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragestoreRemove>();
}
case 95: {
return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnMethodWebextstoragestoreSet>();
}
case 96: {
return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnConstructorWebextstoragestoreNew>(); return MakeUnique<ScaffoldingCallHandlerUniffiWebextStorageFnConstructorWebextstoragestoreNew>();
} }
#ifdef MOZ_UNIFFI_FIXTURES #ifdef MOZ_UNIFFI_FIXTURES
case 95: { case 97: {
return MakeUnique<ScaffoldingCallHandlerUniffiArithmeticalFnFuncAdd>(); return MakeUnique<ScaffoldingCallHandlerUniffiArithmeticalFnFuncAdd>();
} }
case 96: { case 98: {
return MakeUnique<ScaffoldingCallHandlerUniffiArithmeticalFnFuncDiv>(); return MakeUnique<ScaffoldingCallHandlerUniffiArithmeticalFnFuncDiv>();
} }
case 97: { case 99: {
return MakeUnique<ScaffoldingCallHandlerUniffiArithmeticalFnFuncEqual>(); return MakeUnique<ScaffoldingCallHandlerUniffiArithmeticalFnFuncEqual>();
} }
case 98: { case 100: {
return MakeUnique<ScaffoldingCallHandlerUniffiArithmeticalFnFuncSub>(); return MakeUnique<ScaffoldingCallHandlerUniffiArithmeticalFnFuncSub>();
} }
case 99: { case 101: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiCustomTypesFnFuncGetCustomTypesDemo>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiCustomTypesFnFuncGetCustomTypesDemo>();
} }
case 100: { case 102: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureExternalTypesFnFuncGradient>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureExternalTypesFnFuncGradient>();
} }
case 101: { case 103: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureExternalTypesFnFuncIntersection>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureExternalTypesFnFuncIntersection>();
} }
case 102: { case 104: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureExternalTypesFnFuncMoveSpriteToOrigin>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureExternalTypesFnFuncMoveSpriteToOrigin>();
} }
case 103: { case 105: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureCallbacksFnFuncCallLogRepeat>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureCallbacksFnFuncCallLogRepeat>();
} }
case 104: { case 106: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureCallbacksFnFuncLogEvenNumbers>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureCallbacksFnFuncLogEvenNumbers>();
} }
case 105: { case 107: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureCallbacksFnFuncLogEvenNumbersMainThread>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureCallbacksFnFuncLogEvenNumbersMainThread>();
} }
case 107: { case 109: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncInitializeGeckoGlobalWorkerQueue>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncInitializeGeckoGlobalWorkerQueue>();
} }
case 108: { case 110: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncInitializeGlobalWorkerQueue>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncInitializeGlobalWorkerQueue>();
} }
case 123: { case 125: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnMethodFuturetesterCompleteFutures>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnMethodFuturetesterCompleteFutures>();
} }
case 125: { case 127: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnMethodFuturetesterWakeFutures>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnMethodFuturetesterWakeFutures>();
} }
case 126: { case 128: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnConstructorFuturetesterInit>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnConstructorFuturetesterInit>();
} }
case 127: { case 129: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnMethodRusttaskRun>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnMethodRusttaskRun>();
} }
case 128: { case 130: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnMethodTravellerName>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnMethodTravellerName>();
} }
case 129: { case 131: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnConstructorTravellerNew>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnConstructorTravellerNew>();
} }
case 130: { case 132: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnMethodWorkerqueueAddTask>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnMethodWorkerqueueAddTask>();
} }
case 131: { case 133: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiGeometryFnFuncGradient>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiGeometryFnFuncGradient>();
} }
case 132: { case 134: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiGeometryFnFuncIntersection>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiGeometryFnFuncIntersection>();
} }
case 133: { case 135: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureRefcountsFnFuncGetJsRefcount>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureRefcountsFnFuncGetJsRefcount>();
} }
case 134: { case 136: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureRefcountsFnFuncGetSingleton>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureRefcountsFnFuncGetSingleton>();
} }
case 135: { case 137: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureRefcountsFnMethodSingletonobjectMethod>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureRefcountsFnMethodSingletonobjectMethod>();
} }
case 136: { case 138: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnFuncCopieCarte>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnFuncCopieCarte>();
} }
case 137: { case 139: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnFuncCopieDictionnaire>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnFuncCopieDictionnaire>();
} }
case 138: { case 140: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnFuncCopieEnumeration>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnFuncCopieEnumeration>();
} }
case 139: { case 141: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnFuncCopieEnumerations>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnFuncCopieEnumerations>();
} }
case 140: { case 142: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnFuncSwitcheroo>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnFuncSwitcheroo>();
} }
case 141: { case 143: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonBoolean>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonBoolean>();
} }
case 142: { case 144: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonEnum>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonEnum>();
} }
case 143: { case 145: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonF32>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonF32>();
} }
case 144: { case 146: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonF64>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonF64>();
} }
case 145: { case 147: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonI16Dec>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonI16Dec>();
} }
case 146: { case 148: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonI16Hex>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonI16Hex>();
} }
case 147: { case 149: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonI32Dec>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonI32Dec>();
} }
case 148: { case 150: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonI32Hex>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonI32Hex>();
} }
case 149: { case 151: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonI64Dec>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonI64Dec>();
} }
case 150: { case 152: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonI64Hex>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonI64Hex>();
} }
case 151: { case 153: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonI8Dec>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonI8Dec>();
} }
case 152: { case 154: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonI8Hex>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonI8Hex>();
} }
case 153: { case 155: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonNull>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonNull>();
} }
case 154: { case 156: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonSequence>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonSequence>();
} }
case 155: { case 157: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonString>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonString>();
} }
case 156: { case 158: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonU16Dec>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonU16Dec>();
} }
case 157: { case 159: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonU16Hex>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonU16Hex>();
} }
case 158: { case 160: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonU32Dec>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonU32Dec>();
} }
case 159: { case 161: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonU32Hex>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonU32Hex>();
} }
case 160: { case 162: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonU32Oct>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonU32Oct>();
} }
case 161: { case 163: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonU64Dec>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonU64Dec>();
} }
case 162: { case 164: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonU64Hex>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonU64Hex>();
} }
case 163: { case 165: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonU8Dec>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonU8Dec>();
} }
case 164: { case 166: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonU8Hex>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonU8Hex>();
} }
case 165: { case 167: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonZero>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodOptionneurSinonZero>();
} }
case 166: { case 168: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnConstructorOptionneurNew>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnConstructorOptionneurNew>();
} }
case 167: { case 169: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueBoolean>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueBoolean>();
} }
case 168: { case 170: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueDouble>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueDouble>();
} }
case 169: { case 171: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueFloat>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueFloat>();
} }
case 170: { case 172: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueI16>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueI16>();
} }
case 171: { case 173: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueI32>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueI32>();
} }
case 172: { case 174: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueI64>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueI64>();
} }
case 173: { case 175: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueI8>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueI8>();
} }
case 174: { case 176: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueNombres>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueNombres>();
} }
case 175: { case 177: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueNombresSignes>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueNombresSignes>();
} }
case 176: { case 178: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueOptionneurDictionnaire>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueOptionneurDictionnaire>();
} }
case 177: { case 179: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueString>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueString>();
} }
case 178: { case 180: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueU16>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueU16>();
} }
case 179: { case 181: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueU32>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueU32>();
} }
case 180: { case 182: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueU64>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueU64>();
} }
case 181: { case 183: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueU8>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodRetourneurIdentiqueU8>();
} }
case 182: { case 184: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnConstructorRetourneurNew>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnConstructorRetourneurNew>();
} }
case 183: { case 185: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodStringifierToStringBoolean>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodStringifierToStringBoolean>();
} }
case 184: { case 186: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodStringifierToStringDouble>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodStringifierToStringDouble>();
} }
case 185: { case 187: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodStringifierToStringFloat>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodStringifierToStringFloat>();
} }
case 186: { case 188: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodStringifierToStringI16>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodStringifierToStringI16>();
} }
case 187: { case 189: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodStringifierToStringI32>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodStringifierToStringI32>();
} }
case 188: { case 190: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodStringifierToStringI64>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodStringifierToStringI64>();
} }
case 189: { case 191: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodStringifierToStringI8>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodStringifierToStringI8>();
} }
case 190: { case 192: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodStringifierToStringU16>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodStringifierToStringU16>();
} }
case 191: { case 193: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodStringifierToStringU32>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodStringifierToStringU32>();
} }
case 192: { case 194: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodStringifierToStringU64>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodStringifierToStringU64>();
} }
case 193: { case 195: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodStringifierToStringU8>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodStringifierToStringU8>();
} }
case 194: { case 196: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodStringifierWellKnownString>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnMethodStringifierWellKnownString>();
} }
case 195: { case 197: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnConstructorStringifierNew>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiRondpointFnConstructorStringifierNew>();
} }
case 196: { case 198: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiSpritesFnFuncTranslate>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiSpritesFnFuncTranslate>();
} }
case 197: { case 199: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiSpritesFnMethodSpriteGetPosition>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiSpritesFnMethodSpriteGetPosition>();
} }
case 198: { case 200: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiSpritesFnMethodSpriteMoveBy>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiSpritesFnMethodSpriteMoveBy>();
} }
case 199: { case 201: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiSpritesFnMethodSpriteMoveTo>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiSpritesFnMethodSpriteMoveTo>();
} }
case 200: { case 202: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiSpritesFnConstructorSpriteNew>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiSpritesFnConstructorSpriteNew>();
} }
case 201: { case 203: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiSpritesFnConstructorSpriteNewRelativeTo>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiSpritesFnConstructorSpriteNewRelativeTo>();
} }
case 202: { case 204: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnFuncCreateEntryWith>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnFuncCreateEntryWith>();
} }
case 203: { case 205: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnFuncGetDefaultList>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnFuncGetDefaultList>();
} }
case 204: { case 206: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnFuncSetDefaultList>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnFuncSetDefaultList>();
} }
case 205: { case 207: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnMethodTodolistAddEntries>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnMethodTodolistAddEntries>();
} }
case 206: { case 208: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnMethodTodolistAddEntry>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnMethodTodolistAddEntry>();
} }
case 207: { case 209: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnMethodTodolistAddItem>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnMethodTodolistAddItem>();
} }
case 208: { case 210: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnMethodTodolistAddItems>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnMethodTodolistAddItems>();
} }
case 209: { case 211: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnMethodTodolistClearItem>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnMethodTodolistClearItem>();
} }
case 210: { case 212: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnMethodTodolistGetEntries>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnMethodTodolistGetEntries>();
} }
case 211: { case 213: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnMethodTodolistGetFirst>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnMethodTodolistGetFirst>();
} }
case 212: { case 214: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnMethodTodolistGetItems>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnMethodTodolistGetItems>();
} }
case 213: { case 215: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnMethodTodolistGetLast>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnMethodTodolistGetLast>();
} }
case 214: { case 216: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnMethodTodolistGetLastEntry>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnMethodTodolistGetLastEntry>();
} }
case 215: { case 217: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnMethodTodolistMakeDefault>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnMethodTodolistMakeDefault>();
} }
case 216: { case 218: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnConstructorTodolistNew>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTodolistFnConstructorTodolistNew>();
} }
case 217: { case 219: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTraitInterfacesFnFuncMakeBuggyCalculator>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTraitInterfacesFnFuncMakeBuggyCalculator>();
} }
case 218: { case 220: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTraitInterfacesFnFuncMakeCalculator>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTraitInterfacesFnFuncMakeCalculator>();
} }
case 219: { case 221: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTraitInterfacesFnMethodCalcAdd>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiTraitInterfacesFnMethodCalcAdd>();
} }
#endif /* MOZ_UNIFFI_FIXTURES */ #endif /* MOZ_UNIFFI_FIXTURES */
@@ -10748,52 +10835,52 @@ UniquePtr<UniffiAsyncCallHandler> GetAsyncCallHandler(uint64_t aId) {
#ifdef MOZ_UNIFFI_FIXTURES #ifdef MOZ_UNIFFI_FIXTURES
case 106: { case 108: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncExpensiveComputation>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncExpensiveComputation>();
} }
case 109: { case 111: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripF32>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripF32>();
} }
case 110: { case 112: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripF64>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripF64>();
} }
case 111: { case 113: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripI16>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripI16>();
} }
case 112: { case 114: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripI32>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripI32>();
} }
case 113: { case 115: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripI64>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripI64>();
} }
case 114: { case 116: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripI8>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripI8>();
} }
case 115: { case 117: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripMap>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripMap>();
} }
case 116: { case 118: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripObj>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripObj>();
} }
case 117: { case 119: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripString>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripString>();
} }
case 118: { case 120: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripU16>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripU16>();
} }
case 119: { case 121: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripU32>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripU32>();
} }
case 120: { case 122: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripU64>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripU64>();
} }
case 121: { case 123: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripU8>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripU8>();
} }
case 122: { case 124: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripVec>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnFuncRoundtripVec>();
} }
case 124: { case 126: {
return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnMethodFuturetesterMakeFuture>(); return MakeUnique<ScaffoldingCallHandlerUniffiUniffiFixtureFuturesFnMethodFuturetesterMakeFuture>();
} }
#endif /* MOZ_UNIFFI_FIXTURES */ #endif /* MOZ_UNIFFI_FIXTURES */