Bug 1952316 - Create ContextId module to wrap RustContextId.sys.mjs. r=nanj,markh,chutten
Differential Revision: https://phabricator.services.mozilla.com/D248973
This commit is contained in:
committed by
mconley@mozilla.com
parent
b6a5beb740
commit
cd84a13b70
@@ -3390,3 +3390,8 @@ pref("toolkit.contentRelevancy.enabled", false);
|
|||||||
pref("toolkit.contentRelevancy.ingestEnabled", false);
|
pref("toolkit.contentRelevancy.ingestEnabled", false);
|
||||||
// Pref to enable extra logging for the content relevancy feature
|
// Pref to enable extra logging for the content relevancy feature
|
||||||
pref("toolkit.contentRelevancy.log", false);
|
pref("toolkit.contentRelevancy.log", false);
|
||||||
|
|
||||||
|
// The number of days after which to rotate the context ID. 0 means to disable
|
||||||
|
// rotation altogether.
|
||||||
|
pref("browser.contextual-services.contextId.rotation-in-days", 0);
|
||||||
|
pref("browser.contextual-services.contextId.rust-component.enabled", false);
|
||||||
|
|||||||
165
browser/modules/ContextId.sys.mjs
Normal file
165
browser/modules/ContextId.sys.mjs
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
/* 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/. */
|
||||||
|
|
||||||
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
|
import { ContextIdComponent } from "resource://gre/modules/RustContextId.sys.mjs";
|
||||||
|
|
||||||
|
const CONTEXT_ID_PREF = "browser.contextual-services.contextId";
|
||||||
|
const CONTEXT_ID_TIMESTAMP_PREF =
|
||||||
|
"browser.contextual-services.contextId.timestamp-in-seconds";
|
||||||
|
const CONTEXT_ID_ROTATION_DAYS_PREF =
|
||||||
|
"browser.contextual-services.contextId.rotation-in-days";
|
||||||
|
const CONTEXT_ID_RUST_COMPONENT_ENABLED_PREF =
|
||||||
|
"browser.contextual-services.contextId.rust-component.enabled";
|
||||||
|
const TOPIC_APP_QUIT = "quit-application";
|
||||||
|
|
||||||
|
const lazy = {};
|
||||||
|
|
||||||
|
XPCOMUtils.defineLazyPreferenceGetter(
|
||||||
|
lazy,
|
||||||
|
"CURRENT_CONTEXT_ID",
|
||||||
|
CONTEXT_ID_PREF,
|
||||||
|
""
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A class that manages and (optionally) rotates the context ID, which is a
|
||||||
|
* a unique identifier used by Contextual Services.
|
||||||
|
*/
|
||||||
|
export class _ContextId extends EventTarget {
|
||||||
|
#comp = null;
|
||||||
|
#rotationDays = 0;
|
||||||
|
#rustComponentEnabled = false;
|
||||||
|
#observer = null;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
|
||||||
|
this.#rustComponentEnabled = Services.prefs.getBoolPref(
|
||||||
|
CONTEXT_ID_RUST_COMPONENT_ENABLED_PREF,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
|
||||||
|
if (this.#rustComponentEnabled) {
|
||||||
|
GleanPings.contextIdDeletionRequest.setEnabled(true);
|
||||||
|
|
||||||
|
// We intentionally read this once at construction, and cache the result.
|
||||||
|
// This is because enabling or disabling rotation may affect external
|
||||||
|
// uses of _ContextId which (for example) send the context_id UUID to
|
||||||
|
// Shredder in the context-id-deletion-request ping (which we only want to
|
||||||
|
// do when rotation is disabled), and that sort of thing tends to get set
|
||||||
|
// once during startup.
|
||||||
|
this.#rotationDays = Services.prefs.getIntPref(
|
||||||
|
CONTEXT_ID_ROTATION_DAYS_PREF,
|
||||||
|
0
|
||||||
|
);
|
||||||
|
this.#comp = ContextIdComponent.init(
|
||||||
|
lazy.CURRENT_CONTEXT_ID,
|
||||||
|
Services.prefs.getIntPref(CONTEXT_ID_TIMESTAMP_PREF, 0),
|
||||||
|
Cu.isInAutomation,
|
||||||
|
{
|
||||||
|
persist: (newContextId, creationTimestamp) => {
|
||||||
|
Services.prefs.setCharPref(CONTEXT_ID_PREF, newContextId);
|
||||||
|
Services.prefs.setIntPref(
|
||||||
|
CONTEXT_ID_TIMESTAMP_PREF,
|
||||||
|
creationTimestamp
|
||||||
|
);
|
||||||
|
this.dispatchEvent(new CustomEvent("ContextId:Persisted"));
|
||||||
|
},
|
||||||
|
|
||||||
|
rotated: oldContextId => {
|
||||||
|
Glean.contextualServices.contextId.set(oldContextId);
|
||||||
|
GleanPings.contextIdDeletionRequest.submit();
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
this.#observer = (subject, topic, data) => {
|
||||||
|
this.observe(subject, topic, data);
|
||||||
|
};
|
||||||
|
|
||||||
|
Services.obs.addObserver(this.#observer, TOPIC_APP_QUIT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* nsIObserver implementation.
|
||||||
|
*
|
||||||
|
* @param {nsISupports} _subject
|
||||||
|
* @param {string} topic
|
||||||
|
* @param {string} _data
|
||||||
|
*/
|
||||||
|
observe(_subject, topic, _data) {
|
||||||
|
if (topic == TOPIC_APP_QUIT) {
|
||||||
|
// Unregister ourselves as the callback to avoid leak assertions.
|
||||||
|
this.#comp.unsetCallback();
|
||||||
|
Services.obs.removeObserver(this.#observer, TOPIC_APP_QUIT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the stored context ID for this profile, if one exists. If one
|
||||||
|
* doesn't exist, one is generated and then returned. In the event that
|
||||||
|
* context ID rotation is in effect, then this may return a different
|
||||||
|
* context ID if we've determined it's time to rotate. This means that
|
||||||
|
* consumers _should not_ cache the context ID, but always request it.
|
||||||
|
*
|
||||||
|
* @returns {Promise<string>}
|
||||||
|
* The context ID for this profile.
|
||||||
|
*/
|
||||||
|
async request() {
|
||||||
|
if (this.#rustComponentEnabled) {
|
||||||
|
return this.#comp.request(this.#rotationDays);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fallback to the legacy behaviour of just returning the pref, or
|
||||||
|
// generating / returning a UUID if the pref is false-y.
|
||||||
|
if (!lazy.CURRENT_CONTEXT_ID) {
|
||||||
|
let _contextId = Services.uuid.generateUUID().toString();
|
||||||
|
Services.prefs.setStringPref(CONTEXT_ID_PREF, _contextId);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Promise.resolve(lazy.CURRENT_CONTEXT_ID);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Forces the rotation of the context ID. This should be used by callers when
|
||||||
|
* some surface that uses the context ID is disabled. This is only supported
|
||||||
|
* with the Rust backend, and is a no-op when the Rust backend is not enabled.
|
||||||
|
*
|
||||||
|
* @returns {Promise<undefined>}
|
||||||
|
*/
|
||||||
|
async forceRotation() {
|
||||||
|
if (this.#rustComponentEnabled) {
|
||||||
|
return this.#comp.forceRotation();
|
||||||
|
}
|
||||||
|
return Promise.resolve();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if context ID rotation is enabled.
|
||||||
|
*
|
||||||
|
* @returns {boolean}
|
||||||
|
*/
|
||||||
|
get rotationEnabled() {
|
||||||
|
return this.#rustComponentEnabled && this.#rotationDays > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A compatibility shim that only works if rotationEnabled is false which
|
||||||
|
* returns the context ID synchronously. This will throw if rotationEnabled
|
||||||
|
* is true - so callers should ensure that rotationEnabled is false before
|
||||||
|
* using this. This will eventually be removed.
|
||||||
|
*/
|
||||||
|
requestSynchronously() {
|
||||||
|
if (this.rotationEnabled) {
|
||||||
|
throw new Error(
|
||||||
|
"Cannot request context ID synchronously when rotation is enabled."
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return lazy.CURRENT_CONTEXT_ID;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export const ContextId = new _ContextId();
|
||||||
@@ -1661,3 +1661,25 @@ link_icon_sizes_attr:
|
|||||||
- fx-search-telemetry@mozilla.com
|
- fx-search-telemetry@mozilla.com
|
||||||
expires: never
|
expires: never
|
||||||
telemetry_mirror: LINK_ICON_SIZES_ATTR_DIMENSION
|
telemetry_mirror: LINK_ICON_SIZES_ATTR_DIMENSION
|
||||||
|
|
||||||
|
contextual_services:
|
||||||
|
context_id:
|
||||||
|
type: uuid
|
||||||
|
description: >
|
||||||
|
An identifier for Contextual Services user interaction pings. This is
|
||||||
|
used internally for counting unique users as well as for anti-fraud. It
|
||||||
|
is shared with other Contextual Services.
|
||||||
|
|
||||||
|
Does not need to be sent in the Glean "deletion-request" ping. It is sent
|
||||||
|
in its own "context-id-deletion-request" ping.
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1952316
|
||||||
|
data_reviews:
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1952316
|
||||||
|
data_sensitivity:
|
||||||
|
- technical
|
||||||
|
notification_emails:
|
||||||
|
- mconley@mozilla.com
|
||||||
|
expires: never
|
||||||
|
send_in_pings:
|
||||||
|
- context-id-deletion-request
|
||||||
|
|||||||
@@ -146,6 +146,10 @@ EXTRA_JS_MODULES += [
|
|||||||
"ZoomUI.sys.mjs",
|
"ZoomUI.sys.mjs",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
MOZ_SRC_FILES += [
|
||||||
|
"ContextId.sys.mjs",
|
||||||
|
]
|
||||||
|
|
||||||
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
|
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
|
||||||
EXTRA_JS_MODULES += [
|
EXTRA_JS_MODULES += [
|
||||||
"FilePickerCrashed.sys.mjs",
|
"FilePickerCrashed.sys.mjs",
|
||||||
|
|||||||
@@ -20,3 +20,20 @@ prototype-no-code-events:
|
|||||||
- chutten@mozilla.com
|
- chutten@mozilla.com
|
||||||
- tlong@mozilla.com
|
- tlong@mozilla.com
|
||||||
enabled: false # To be enabled by Server Knobs for selected populations.
|
enabled: false # To be enabled by Server Knobs for selected populations.
|
||||||
|
|
||||||
|
context-id-deletion-request:
|
||||||
|
description: |
|
||||||
|
This ping is submitted when a context ID has been rotated. A rotation may
|
||||||
|
occur because a user has disabled a surface that uses the context ID, or
|
||||||
|
because the context ID age has exceeded some threshold.
|
||||||
|
include_client_id: false
|
||||||
|
send_if_empty: true
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1952316
|
||||||
|
data_reviews:
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1952316
|
||||||
|
notification_emails:
|
||||||
|
- mconley@mozilla.com
|
||||||
|
metadata:
|
||||||
|
follows_collection_enabled: false
|
||||||
|
include_info_sections: false
|
||||||
|
|||||||
173
browser/modules/test/unit/test_ContextId_LegacyBackend.js
Normal file
173
browser/modules/test/unit/test_ContextId_LegacyBackend.js
Normal file
@@ -0,0 +1,173 @@
|
|||||||
|
/* Any copyright is dedicated to the Public Domain.
|
||||||
|
https://creativecommons.org/publicdomain/zero/1.0/ */
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
const { _ContextId } = ChromeUtils.importESModule(
|
||||||
|
"moz-src:///browser/modules/ContextId.sys.mjs"
|
||||||
|
);
|
||||||
|
|
||||||
|
const CONTEXT_ID_PREF = "browser.contextual-services.contextId";
|
||||||
|
const CONTEXT_ID_TIMESTAMP_PREF =
|
||||||
|
"browser.contextual-services.contextId.timestamp-in-seconds";
|
||||||
|
const CONTEXT_ID_ROTATION_DAYS_PREF =
|
||||||
|
"browser.contextual-services.contextId.rotation-in-days";
|
||||||
|
const UUID_WITH_BRACES_REGEX =
|
||||||
|
/^\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\}$/i;
|
||||||
|
const TEST_CONTEXT_ID_WITH_BRACES = "{decafbad-0cd1-0cd2-0cd3-decafbad1000}";
|
||||||
|
|
||||||
|
do_get_profile();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test that if there's a pre-existing contextID, we can get it, and that a
|
||||||
|
* timestamp will be generated for it.
|
||||||
|
*/
|
||||||
|
add_task(async function test_get_existing() {
|
||||||
|
Services.prefs.setCharPref(CONTEXT_ID_PREF, TEST_CONTEXT_ID_WITH_BRACES);
|
||||||
|
Services.prefs.clearUserPref(CONTEXT_ID_TIMESTAMP_PREF);
|
||||||
|
Services.prefs.setIntPref(CONTEXT_ID_ROTATION_DAYS_PREF, 0);
|
||||||
|
|
||||||
|
let ContextId = new _ContextId();
|
||||||
|
|
||||||
|
Assert.equal(
|
||||||
|
await ContextId.request(),
|
||||||
|
TEST_CONTEXT_ID_WITH_BRACES,
|
||||||
|
"Should have gotten the stored context ID"
|
||||||
|
);
|
||||||
|
|
||||||
|
Assert.ok(
|
||||||
|
!Services.prefs.prefHasUserValue(CONTEXT_ID_TIMESTAMP_PREF),
|
||||||
|
"No timestamp was persisted."
|
||||||
|
);
|
||||||
|
Assert.equal(
|
||||||
|
Services.prefs.getCharPref(CONTEXT_ID_PREF),
|
||||||
|
TEST_CONTEXT_ID_WITH_BRACES,
|
||||||
|
"The same context ID is still stored after requesting."
|
||||||
|
);
|
||||||
|
|
||||||
|
Assert.equal(
|
||||||
|
await ContextId.request(),
|
||||||
|
TEST_CONTEXT_ID_WITH_BRACES,
|
||||||
|
"Should have gotten the same stored context ID back again."
|
||||||
|
);
|
||||||
|
|
||||||
|
// We should be able to synchronously request the context ID in this
|
||||||
|
// configuration.
|
||||||
|
Assert.equal(
|
||||||
|
ContextId.requestSynchronously(),
|
||||||
|
TEST_CONTEXT_ID_WITH_BRACES,
|
||||||
|
"Got the stored context ID back synchronously."
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test that if there's not a pre-existing contextID, we will generate one, but
|
||||||
|
* no timestamp will be generated for it.
|
||||||
|
*/
|
||||||
|
add_task(async function test_generate() {
|
||||||
|
Services.prefs.clearUserPref(CONTEXT_ID_PREF);
|
||||||
|
Services.prefs.clearUserPref(CONTEXT_ID_TIMESTAMP_PREF);
|
||||||
|
|
||||||
|
let ContextId = new _ContextId();
|
||||||
|
|
||||||
|
const generatedContextID = await ContextId.request();
|
||||||
|
|
||||||
|
Assert.ok(
|
||||||
|
UUID_WITH_BRACES_REGEX.test(generatedContextID),
|
||||||
|
"Should have gotten a UUID generated for the context ID."
|
||||||
|
);
|
||||||
|
|
||||||
|
Assert.ok(
|
||||||
|
!Services.prefs.prefHasUserValue(CONTEXT_ID_TIMESTAMP_PREF),
|
||||||
|
"No timestamp was persisted."
|
||||||
|
);
|
||||||
|
|
||||||
|
Assert.equal(
|
||||||
|
await ContextId.request(),
|
||||||
|
generatedContextID,
|
||||||
|
"Should have gotten the same stored context ID back again."
|
||||||
|
);
|
||||||
|
|
||||||
|
// We should be able to synchronously request the context ID in this
|
||||||
|
// configuration.
|
||||||
|
Assert.equal(
|
||||||
|
ContextId.requestSynchronously(),
|
||||||
|
generatedContextID,
|
||||||
|
"Got the stored context ID back synchronously."
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test that if we have a pre-existing context ID, and we (for some reason)
|
||||||
|
* have rotation period set to a non-zero value, and a creation timestamp
|
||||||
|
* exists, that the context ID does not rotate between requests.
|
||||||
|
*/
|
||||||
|
add_task(async function test_no_rotation() {
|
||||||
|
Services.prefs.setCharPref(CONTEXT_ID_PREF, TEST_CONTEXT_ID_WITH_BRACES);
|
||||||
|
Services.prefs.setIntPref(CONTEXT_ID_TIMESTAMP_PREF, 1);
|
||||||
|
Services.prefs.setIntPref(CONTEXT_ID_ROTATION_DAYS_PREF, 1);
|
||||||
|
// Let's say there's a 30 day rotation window.
|
||||||
|
const ROTATION_DAYS = 30;
|
||||||
|
Services.prefs.setIntPref(CONTEXT_ID_ROTATION_DAYS_PREF, ROTATION_DAYS);
|
||||||
|
|
||||||
|
let ContextId = new _ContextId();
|
||||||
|
|
||||||
|
Assert.ok(
|
||||||
|
!ContextId.rotationEnabled,
|
||||||
|
"ContextId should report that rotation is not enabled."
|
||||||
|
);
|
||||||
|
|
||||||
|
Assert.equal(
|
||||||
|
await ContextId.request(),
|
||||||
|
TEST_CONTEXT_ID_WITH_BRACES,
|
||||||
|
"Should have gotten the stored context ID"
|
||||||
|
);
|
||||||
|
Assert.equal(
|
||||||
|
Services.prefs.getIntPref(CONTEXT_ID_TIMESTAMP_PREF),
|
||||||
|
1,
|
||||||
|
"The timestamp should not have changed."
|
||||||
|
);
|
||||||
|
|
||||||
|
// We should be able to synchronously request the context ID in this
|
||||||
|
// configuration.
|
||||||
|
Assert.equal(
|
||||||
|
ContextId.requestSynchronously(),
|
||||||
|
TEST_CONTEXT_ID_WITH_BRACES,
|
||||||
|
"Got the stored context ID back synchronously."
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test that calling forceRotation is a no-op with the legacy backend.
|
||||||
|
*/
|
||||||
|
add_task(async function test_force_rotation() {
|
||||||
|
Services.prefs.setCharPref(CONTEXT_ID_PREF, TEST_CONTEXT_ID_WITH_BRACES);
|
||||||
|
Services.prefs.clearUserPref(CONTEXT_ID_TIMESTAMP_PREF);
|
||||||
|
|
||||||
|
let ContextId = new _ContextId();
|
||||||
|
Assert.equal(
|
||||||
|
await ContextId.request(),
|
||||||
|
TEST_CONTEXT_ID_WITH_BRACES,
|
||||||
|
"Should have gotten the stored context ID"
|
||||||
|
);
|
||||||
|
|
||||||
|
await ContextId.forceRotation();
|
||||||
|
|
||||||
|
Assert.equal(
|
||||||
|
await ContextId.request(),
|
||||||
|
TEST_CONTEXT_ID_WITH_BRACES,
|
||||||
|
"Should have gotten the stored context ID"
|
||||||
|
);
|
||||||
|
Assert.ok(
|
||||||
|
!Services.prefs.prefHasUserValue(CONTEXT_ID_TIMESTAMP_PREF),
|
||||||
|
"The timestamp should not have changed."
|
||||||
|
);
|
||||||
|
|
||||||
|
// We should be able to synchronously request the context ID in this
|
||||||
|
// configuration.
|
||||||
|
Assert.equal(
|
||||||
|
ContextId.requestSynchronously(),
|
||||||
|
TEST_CONTEXT_ID_WITH_BRACES,
|
||||||
|
"Got the stored context ID back synchronously."
|
||||||
|
);
|
||||||
|
});
|
||||||
310
browser/modules/test/unit/test_ContextId_RustBackend.js
Normal file
310
browser/modules/test/unit/test_ContextId_RustBackend.js
Normal file
@@ -0,0 +1,310 @@
|
|||||||
|
/* Any copyright is dedicated to the Public Domain.
|
||||||
|
https://creativecommons.org/publicdomain/zero/1.0/ */
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
const { _ContextId } = ChromeUtils.importESModule(
|
||||||
|
"moz-src:///browser/modules/ContextId.sys.mjs"
|
||||||
|
);
|
||||||
|
|
||||||
|
const CONTEXT_ID_PREF = "browser.contextual-services.contextId";
|
||||||
|
const CONTEXT_ID_TIMESTAMP_PREF =
|
||||||
|
"browser.contextual-services.contextId.timestamp-in-seconds";
|
||||||
|
const CONTEXT_ID_ROTATION_DAYS_PREF =
|
||||||
|
"browser.contextual-services.contextId.rotation-in-days";
|
||||||
|
const UUID_REGEX =
|
||||||
|
/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
||||||
|
const TEST_CONTEXT_ID = "decafbad-0cd1-0cd2-0cd3-decafbad1000";
|
||||||
|
const TEST_CONTEXT_ID_WITH_BRACES = "{" + TEST_CONTEXT_ID + "}";
|
||||||
|
const TOPIC_APP_QUIT = "quit-application";
|
||||||
|
|
||||||
|
do_get_profile();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resolves when the passed in ContextId instance fires the ContextId:Persisted
|
||||||
|
* event.
|
||||||
|
*
|
||||||
|
* @param {_ContextId} instance
|
||||||
|
* An instance of the _ContextId class under test.
|
||||||
|
* @returns {Promise<CustomEvent>}
|
||||||
|
*/
|
||||||
|
function waitForPersist(instance) {
|
||||||
|
return new Promise(resolve => {
|
||||||
|
instance.addEventListener("ContextId:Persisted", resolve, { once: true });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resolves when the the context-id-deletion-request ping is next sent, and
|
||||||
|
* checks that it sends the rotatedFromContextId value.
|
||||||
|
*
|
||||||
|
* @param {string} rotatedFromContextIed
|
||||||
|
* The context ID that was rotated away from.
|
||||||
|
* @param {Function} taskFn
|
||||||
|
* A function that will trigger the ping to be sent. This function might
|
||||||
|
* be async.
|
||||||
|
* @returns {Promise<undefined>}
|
||||||
|
*/
|
||||||
|
function waitForRotated(rotatedFromContextId, taskFn) {
|
||||||
|
return GleanPings.contextIdDeletionRequest.testSubmission(() => {
|
||||||
|
Assert.equal(
|
||||||
|
Glean.contextualServices.contextId.testGetValue(),
|
||||||
|
rotatedFromContextId,
|
||||||
|
"Sent the right context ID to be deleted."
|
||||||
|
);
|
||||||
|
}, taskFn);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks that when a taskFn resolves, a context ID rotation has not occurred
|
||||||
|
* for the instance.
|
||||||
|
*
|
||||||
|
* @param {_ContextId} instance
|
||||||
|
* The instance of _ContextId under test.
|
||||||
|
* @param {function} taskFn
|
||||||
|
* A function that is being tested to ensure that it does not cause rotation
|
||||||
|
* to occur. It can be async.
|
||||||
|
* @returns {Promise<undefined>}
|
||||||
|
*/
|
||||||
|
async function doesNotRotate(instance, taskFn) {
|
||||||
|
let controller = new AbortController();
|
||||||
|
instance.addEventListener(
|
||||||
|
"ContextId:Rotated",
|
||||||
|
() => {
|
||||||
|
Assert.ok(false, "Saw unexpected rotation.");
|
||||||
|
},
|
||||||
|
{ signal: controller.signal }
|
||||||
|
);
|
||||||
|
await taskFn();
|
||||||
|
controller.abort();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calls a testing function with a ContextId instance. Once the testing function
|
||||||
|
* resolves (or if it throws), this function will take care of cleaning up the
|
||||||
|
* instance.
|
||||||
|
*
|
||||||
|
* @param {function(_ContextId): Promise<undefined>} taskFn
|
||||||
|
* A testing function, which will be passed an instance of _ContextId to run
|
||||||
|
* its test on. The function can be async.
|
||||||
|
* @returns {Promise<undefined>}
|
||||||
|
*/
|
||||||
|
async function withTestingContextId(taskFn) {
|
||||||
|
let instance = new _ContextId();
|
||||||
|
try {
|
||||||
|
await taskFn(instance);
|
||||||
|
} finally {
|
||||||
|
instance.observe(null, TOPIC_APP_QUIT, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
add_setup(() => {
|
||||||
|
Services.fog.initializeFOG();
|
||||||
|
registerCleanupFunction(() => {
|
||||||
|
// Importing from ContextId.sys.mjs will have automatically instantiated
|
||||||
|
// and registered the default ContextId. We need to inform it that we're
|
||||||
|
// shutting down so that it can uninitialiez itself.
|
||||||
|
const { ContextId } = ChromeUtils.importESModule(
|
||||||
|
"moz-src:///browser/modules/ContextId.sys.mjs"
|
||||||
|
);
|
||||||
|
|
||||||
|
ContextId.observe(null, TOPIC_APP_QUIT, null);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test that if there's a pre-existing contextID, we can get it, and that a
|
||||||
|
* timestamp will be generated for it.
|
||||||
|
*/
|
||||||
|
add_task(async function test_get_existing() {
|
||||||
|
// Historically, we've stored the context ID with braces, but our endpoints
|
||||||
|
// actually would prefer just the raw UUID. The Rust component does the
|
||||||
|
// work of stripping those off for us automatically. We'll test that by
|
||||||
|
// starting with a context ID with braces in storage, and ensuring that
|
||||||
|
// what gets saved and what gets returned does not have braces.
|
||||||
|
Services.prefs.setCharPref(CONTEXT_ID_PREF, TEST_CONTEXT_ID_WITH_BRACES);
|
||||||
|
Services.prefs.clearUserPref(CONTEXT_ID_TIMESTAMP_PREF);
|
||||||
|
Services.prefs.setIntPref(CONTEXT_ID_ROTATION_DAYS_PREF, 0);
|
||||||
|
|
||||||
|
await withTestingContextId(async instance => {
|
||||||
|
let persisted = waitForPersist(instance);
|
||||||
|
|
||||||
|
Assert.equal(
|
||||||
|
await instance.request(),
|
||||||
|
TEST_CONTEXT_ID,
|
||||||
|
"Should have gotten the stored context ID"
|
||||||
|
);
|
||||||
|
|
||||||
|
await persisted;
|
||||||
|
Assert.equal(
|
||||||
|
typeof Services.prefs.getIntPref(CONTEXT_ID_TIMESTAMP_PREF, 0),
|
||||||
|
"number",
|
||||||
|
"We stored a timestamp for the context ID."
|
||||||
|
);
|
||||||
|
Assert.equal(
|
||||||
|
Services.prefs.getCharPref(CONTEXT_ID_PREF),
|
||||||
|
TEST_CONTEXT_ID,
|
||||||
|
"We stored a the context ID without braces."
|
||||||
|
);
|
||||||
|
|
||||||
|
Assert.equal(
|
||||||
|
await instance.request(),
|
||||||
|
TEST_CONTEXT_ID,
|
||||||
|
"Should have gotten the same stored context ID back again."
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test that if there's not a pre-existing contextID, we will generate one, and
|
||||||
|
* a timestamp will be generated for it.
|
||||||
|
*/
|
||||||
|
add_task(async function test_generate() {
|
||||||
|
Services.prefs.clearUserPref(CONTEXT_ID_PREF);
|
||||||
|
Services.prefs.clearUserPref(CONTEXT_ID_TIMESTAMP_PREF);
|
||||||
|
|
||||||
|
await withTestingContextId(async instance => {
|
||||||
|
let persisted = waitForPersist(instance);
|
||||||
|
|
||||||
|
const generatedContextID = await instance.request();
|
||||||
|
await persisted;
|
||||||
|
|
||||||
|
Assert.ok(
|
||||||
|
UUID_REGEX.test(generatedContextID),
|
||||||
|
"Should have gotten a UUID generated for the context ID."
|
||||||
|
);
|
||||||
|
Assert.equal(
|
||||||
|
typeof Services.prefs.getIntPref(CONTEXT_ID_TIMESTAMP_PREF, 0),
|
||||||
|
"number",
|
||||||
|
"We stored a timestamp for the context ID."
|
||||||
|
);
|
||||||
|
|
||||||
|
Assert.equal(
|
||||||
|
await instance.request(),
|
||||||
|
generatedContextID,
|
||||||
|
"Should have gotten the same stored context ID back again."
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test that if we have a pre-existing context ID, with an extremely old
|
||||||
|
* creation date (we'll use a creation date of 1, which is back in the 1970s),
|
||||||
|
* but a rotation setting of 0, that we don't rotate the context ID.
|
||||||
|
*/
|
||||||
|
add_task(async function test_no_rotation() {
|
||||||
|
Services.prefs.setCharPref(CONTEXT_ID_PREF, TEST_CONTEXT_ID);
|
||||||
|
Services.prefs.setIntPref(CONTEXT_ID_TIMESTAMP_PREF, 1);
|
||||||
|
Services.prefs.setIntPref(CONTEXT_ID_ROTATION_DAYS_PREF, 0);
|
||||||
|
|
||||||
|
await withTestingContextId(async instance => {
|
||||||
|
Assert.ok(
|
||||||
|
!instance.rotationEnabled,
|
||||||
|
"ContextId should report that rotation is not enabled."
|
||||||
|
);
|
||||||
|
|
||||||
|
await doesNotRotate(instance, async () => {
|
||||||
|
Assert.equal(
|
||||||
|
await instance.request(),
|
||||||
|
TEST_CONTEXT_ID,
|
||||||
|
"Should have gotten the stored context ID"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
// We should be able to synchronously request the context ID in this
|
||||||
|
// configuration.
|
||||||
|
Assert.equal(
|
||||||
|
instance.requestSynchronously(),
|
||||||
|
TEST_CONTEXT_ID,
|
||||||
|
"Got the stored context ID back synchronously."
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test that if we have a pre-existing context ID, and if the age associated
|
||||||
|
* with it is greater than our rotation window, that we'll generate a new
|
||||||
|
* context ID and update the creation timestamp. We'll use a creation timestamp
|
||||||
|
* of the original context ID of 1, which is sometime in the 1970s.
|
||||||
|
*/
|
||||||
|
add_task(async function test_rotation() {
|
||||||
|
Services.prefs.setCharPref(CONTEXT_ID_PREF, TEST_CONTEXT_ID);
|
||||||
|
Services.prefs.setIntPref(CONTEXT_ID_TIMESTAMP_PREF, 1);
|
||||||
|
// Let's say there's a 30 day rotation window.
|
||||||
|
const ROTATION_DAYS = 30;
|
||||||
|
Services.prefs.setIntPref(CONTEXT_ID_ROTATION_DAYS_PREF, ROTATION_DAYS);
|
||||||
|
|
||||||
|
await withTestingContextId(async instance => {
|
||||||
|
Assert.ok(
|
||||||
|
instance.rotationEnabled,
|
||||||
|
"ContextId should report that rotation is enabled."
|
||||||
|
);
|
||||||
|
|
||||||
|
let generatedContextID;
|
||||||
|
|
||||||
|
await waitForRotated(TEST_CONTEXT_ID, async () => {
|
||||||
|
let persisted = waitForPersist(instance);
|
||||||
|
generatedContextID = await instance.request();
|
||||||
|
await persisted;
|
||||||
|
});
|
||||||
|
|
||||||
|
Assert.ok(
|
||||||
|
UUID_REGEX.test(generatedContextID),
|
||||||
|
"Should have gotten a UUID generated for the context ID."
|
||||||
|
);
|
||||||
|
|
||||||
|
let creationTimestamp = Services.prefs.getIntPref(
|
||||||
|
CONTEXT_ID_TIMESTAMP_PREF
|
||||||
|
);
|
||||||
|
// We should have bumped the creation timestamp.
|
||||||
|
Assert.greater(creationTimestamp, 1);
|
||||||
|
|
||||||
|
// We should NOT be able to synchronously request the context ID in this
|
||||||
|
// configuration.
|
||||||
|
Assert.throws(() => {
|
||||||
|
instance.requestSynchronously();
|
||||||
|
}, /Cannot request context ID synchronously/);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test that if we have a pre-existing context ID, we can force rotation even
|
||||||
|
* if the expiry hasn't come up.
|
||||||
|
*/
|
||||||
|
add_task(async function test_force_rotation() {
|
||||||
|
Services.prefs.setCharPref(CONTEXT_ID_PREF, TEST_CONTEXT_ID);
|
||||||
|
Services.prefs.clearUserPref(CONTEXT_ID_TIMESTAMP_PREF);
|
||||||
|
// Let's say there's a 30 day rotation window.
|
||||||
|
const ROTATION_DAYS = 30;
|
||||||
|
Services.prefs.setIntPref(CONTEXT_ID_ROTATION_DAYS_PREF, ROTATION_DAYS);
|
||||||
|
|
||||||
|
await withTestingContextId(async instance => {
|
||||||
|
Assert.equal(
|
||||||
|
await instance.request(),
|
||||||
|
TEST_CONTEXT_ID,
|
||||||
|
"Should have gotten the stored context ID"
|
||||||
|
);
|
||||||
|
|
||||||
|
await waitForRotated(TEST_CONTEXT_ID, async () => {
|
||||||
|
await instance.forceRotation();
|
||||||
|
});
|
||||||
|
|
||||||
|
let generatedContextID = await instance.request();
|
||||||
|
|
||||||
|
Assert.notEqual(
|
||||||
|
generatedContextID,
|
||||||
|
TEST_CONTEXT_ID,
|
||||||
|
"The context ID should have been regenerated."
|
||||||
|
);
|
||||||
|
Assert.ok(
|
||||||
|
UUID_REGEX.test(generatedContextID),
|
||||||
|
"Should have gotten a UUID generated for the context ID."
|
||||||
|
);
|
||||||
|
|
||||||
|
// We should NOT be able to synchronously request the context ID in this
|
||||||
|
// configuration.
|
||||||
|
Assert.throws(() => {
|
||||||
|
instance.requestSynchronously();
|
||||||
|
}, /Cannot request context ID synchronously/);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -3,6 +3,12 @@ head = ''
|
|||||||
firefox-appdir = "browser"
|
firefox-appdir = "browser"
|
||||||
tags = "os_integration"
|
tags = "os_integration"
|
||||||
|
|
||||||
|
["test_ContextId_LegacyBackend.js"]
|
||||||
|
prefs = ["browser.contextual-services.contextId.rust-component.enabled=false"]
|
||||||
|
|
||||||
|
["test_ContextId_RustBackend.js"]
|
||||||
|
prefs = ["browser.contextual-services.contextId.rust-component.enabled=true"]
|
||||||
|
|
||||||
["test_Dedupe.js"]
|
["test_Dedupe.js"]
|
||||||
|
|
||||||
["test_E10SUtils_nested_URIs.js"]
|
["test_E10SUtils_nested_URIs.js"]
|
||||||
|
|||||||
10
docs/rust-components/api/js/context_id.md
Normal file
10
docs/rust-components/api/js/context_id.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# RustContextId.sys.mjs
|
||||||
|
|
||||||
|
```{js:autoclass} RustContextId.sys.ContextIdComponent
|
||||||
|
:members:
|
||||||
|
:exclude-members: ContextIdComponent
|
||||||
|
```
|
||||||
|
```{js:autoclass} RustContextId.sys.Other
|
||||||
|
:members:
|
||||||
|
:exclude-members: Other
|
||||||
|
```
|
||||||
@@ -4820,3 +4820,31 @@ expandSignInButton:
|
|||||||
- fxa-avatar-sign-up
|
- fxa-avatar-sign-up
|
||||||
empty will be assumed default experience
|
empty will be assumed default experience
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
contextID:
|
||||||
|
description: >-
|
||||||
|
Controls the behaviour of the context ID, which is a unique identifier used
|
||||||
|
by Contextual Services.
|
||||||
|
owner: mconley@mozilla.com
|
||||||
|
hasExposure: false
|
||||||
|
variables:
|
||||||
|
rotationPeriodInDays:
|
||||||
|
type: int
|
||||||
|
setPref:
|
||||||
|
branch: user
|
||||||
|
pref: "browser.contextual-services.contextId.rotation-in-days"
|
||||||
|
description: >-
|
||||||
|
The number of days since the creation of the context ID after which the
|
||||||
|
context ID should be regenerated. Set to 0 to disable rotation. This
|
||||||
|
value only takes effect if rustBackendEnabled is also true, otherwise
|
||||||
|
no rotation will occur regardless of the value.
|
||||||
|
|
||||||
|
This setting will only be applied after the next restart.
|
||||||
|
rustBackendEnabled:
|
||||||
|
type: boolean
|
||||||
|
setPref:
|
||||||
|
branch: user
|
||||||
|
pref: "browser.contextual-services.contextId.rust-component.enabled"
|
||||||
|
description: >-
|
||||||
|
Enables the Rust component backend for ContextId.sys.mjs, which is
|
||||||
|
a prerequisite for doing rotations.
|
||||||
|
|||||||
@@ -0,0 +1,870 @@
|
|||||||
|
// This file was autogenerated by the `uniffi-bindgen-gecko-js` crate.
|
||||||
|
// Trust me, you don't want to mess with it!
|
||||||
|
|
||||||
|
import { UniFFITypeError } from "resource://gre/modules/UniFFI.sys.mjs";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Objects intended to be used in the unit tests
|
||||||
|
export var UnitTestObjs = {};
|
||||||
|
|
||||||
|
// Write/Read data to/from an ArrayBuffer
|
||||||
|
class ArrayBufferDataStream {
|
||||||
|
constructor(arrayBuffer) {
|
||||||
|
this.dataView = new DataView(arrayBuffer);
|
||||||
|
this.pos = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
readUint8() {
|
||||||
|
let rv = this.dataView.getUint8(this.pos);
|
||||||
|
this.pos += 1;
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
writeUint8(value) {
|
||||||
|
this.dataView.setUint8(this.pos, value);
|
||||||
|
this.pos += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
readUint16() {
|
||||||
|
let rv = this.dataView.getUint16(this.pos);
|
||||||
|
this.pos += 2;
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
writeUint16(value) {
|
||||||
|
this.dataView.setUint16(this.pos, value);
|
||||||
|
this.pos += 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
readUint32() {
|
||||||
|
let rv = this.dataView.getUint32(this.pos);
|
||||||
|
this.pos += 4;
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
writeUint32(value) {
|
||||||
|
this.dataView.setUint32(this.pos, value);
|
||||||
|
this.pos += 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
readUint64() {
|
||||||
|
let rv = this.dataView.getBigUint64(this.pos);
|
||||||
|
this.pos += 8;
|
||||||
|
return Number(rv);
|
||||||
|
}
|
||||||
|
|
||||||
|
writeUint64(value) {
|
||||||
|
this.dataView.setBigUint64(this.pos, BigInt(value));
|
||||||
|
this.pos += 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
readInt8() {
|
||||||
|
let rv = this.dataView.getInt8(this.pos);
|
||||||
|
this.pos += 1;
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
writeInt8(value) {
|
||||||
|
this.dataView.setInt8(this.pos, value);
|
||||||
|
this.pos += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
readInt16() {
|
||||||
|
let rv = this.dataView.getInt16(this.pos);
|
||||||
|
this.pos += 2;
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
writeInt16(value) {
|
||||||
|
this.dataView.setInt16(this.pos, value);
|
||||||
|
this.pos += 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
readInt32() {
|
||||||
|
let rv = this.dataView.getInt32(this.pos);
|
||||||
|
this.pos += 4;
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
writeInt32(value) {
|
||||||
|
this.dataView.setInt32(this.pos, value);
|
||||||
|
this.pos += 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
readInt64() {
|
||||||
|
let rv = this.dataView.getBigInt64(this.pos);
|
||||||
|
this.pos += 8;
|
||||||
|
return Number(rv);
|
||||||
|
}
|
||||||
|
|
||||||
|
writeInt64(value) {
|
||||||
|
this.dataView.setBigInt64(this.pos, BigInt(value));
|
||||||
|
this.pos += 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
readFloat32() {
|
||||||
|
let rv = this.dataView.getFloat32(this.pos);
|
||||||
|
this.pos += 4;
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
writeFloat32(value) {
|
||||||
|
this.dataView.setFloat32(this.pos, value);
|
||||||
|
this.pos += 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
readFloat64() {
|
||||||
|
let rv = this.dataView.getFloat64(this.pos);
|
||||||
|
this.pos += 8;
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
writeFloat64(value) {
|
||||||
|
this.dataView.setFloat64(this.pos, value);
|
||||||
|
this.pos += 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
writeString(value) {
|
||||||
|
const encoder = new TextEncoder();
|
||||||
|
// Note: in order to efficiently write this data, we first write the
|
||||||
|
// string data, reserving 4 bytes for the size.
|
||||||
|
const dest = new Uint8Array(this.dataView.buffer, this.pos + 4);
|
||||||
|
const encodeResult = encoder.encodeInto(value, dest);
|
||||||
|
if (encodeResult.read != value.length) {
|
||||||
|
throw new UniFFIError(
|
||||||
|
"writeString: out of space when writing to ArrayBuffer. Did the computeSize() method returned the wrong result?"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
const size = encodeResult.written;
|
||||||
|
// Next, go back and write the size before the string data
|
||||||
|
this.dataView.setUint32(this.pos, size);
|
||||||
|
// Finally, advance our position past both the size and string data
|
||||||
|
this.pos += size + 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
readString() {
|
||||||
|
const decoder = new TextDecoder();
|
||||||
|
const size = this.readUint32();
|
||||||
|
const source = new Uint8Array(this.dataView.buffer, this.pos, size)
|
||||||
|
const value = decoder.decode(source);
|
||||||
|
this.pos += size;
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
readBytes() {
|
||||||
|
const size = this.readInt32();
|
||||||
|
const bytes = new Uint8Array(this.dataView.buffer, this.pos, size);
|
||||||
|
this.pos += size;
|
||||||
|
return bytes
|
||||||
|
}
|
||||||
|
|
||||||
|
writeBytes(value) {
|
||||||
|
this.writeUint32(value.length);
|
||||||
|
value.forEach((elt) => {
|
||||||
|
this.writeUint8(elt);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reads a ContextIdComponent pointer from the data stream
|
||||||
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
|
// by the C++ and Rust Scaffolding code.
|
||||||
|
readPointerContextIdComponent() {
|
||||||
|
const pointerId = 0; // context_id:ContextIDComponent
|
||||||
|
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
||||||
|
this.pos += 8;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Writes a ContextIdComponent pointer into the data stream
|
||||||
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
|
// by the C++ and Rust Scaffolding code.
|
||||||
|
writePointerContextIdComponent(value) {
|
||||||
|
const pointerId = 0; // context_id:ContextIDComponent
|
||||||
|
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
||||||
|
this.pos += 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleRustResult(result, liftCallback, liftErrCallback) {
|
||||||
|
switch (result.code) {
|
||||||
|
case "success":
|
||||||
|
return liftCallback(result.data);
|
||||||
|
|
||||||
|
case "error":
|
||||||
|
throw liftErrCallback(result.data);
|
||||||
|
|
||||||
|
case "internal-error":
|
||||||
|
if (result.data) {
|
||||||
|
throw new UniFFIInternalError(FfiConverterString.lift(result.data));
|
||||||
|
} else {
|
||||||
|
throw new UniFFIInternalError("Unknown error");
|
||||||
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new UniFFIError(`Unexpected status code: ${result.code}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class UniFFIError {
|
||||||
|
constructor(message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
toString() {
|
||||||
|
return `UniFFIError: ${this.message}`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class UniFFIInternalError extends UniFFIError {}
|
||||||
|
|
||||||
|
// Base class for FFI converters
|
||||||
|
class FfiConverter {
|
||||||
|
// throw `UniFFITypeError` if a value to be converted has an invalid type
|
||||||
|
static checkType(value) {
|
||||||
|
if (value === undefined ) {
|
||||||
|
throw new UniFFITypeError(`undefined`);
|
||||||
|
}
|
||||||
|
if (value === null ) {
|
||||||
|
throw new UniFFITypeError(`null`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Base class for FFI converters that lift/lower by reading/writing to an ArrayBuffer
|
||||||
|
class FfiConverterArrayBuffer extends FfiConverter {
|
||||||
|
static lift(buf) {
|
||||||
|
return this.read(new ArrayBufferDataStream(buf));
|
||||||
|
}
|
||||||
|
|
||||||
|
static lower(value) {
|
||||||
|
const buf = new ArrayBuffer(this.computeSize(value));
|
||||||
|
const dataStream = new ArrayBufferDataStream(buf);
|
||||||
|
this.write(dataStream, value);
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Computes the size of the value.
|
||||||
|
*
|
||||||
|
* @param {*} _value
|
||||||
|
* @return {number}
|
||||||
|
*/
|
||||||
|
static computeSize(_value) {
|
||||||
|
throw new UniFFIInternalError("computeSize() should be declared in the derived class");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reads the type from a data stream.
|
||||||
|
*
|
||||||
|
* @param {ArrayBufferDataStream} _dataStream
|
||||||
|
* @returns {any}
|
||||||
|
*/
|
||||||
|
static read(_dataStream) {
|
||||||
|
throw new UniFFIInternalError("read() should be declared in the derived class");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes the type to a data stream.
|
||||||
|
*
|
||||||
|
* @param {ArrayBufferDataStream} _dataStream
|
||||||
|
* @param {any} _value
|
||||||
|
*/
|
||||||
|
static write(_dataStream, _value) {
|
||||||
|
throw new UniFFIInternalError("write() should be declared in the derived class");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Symbols that are used to ensure that Object constructors
|
||||||
|
// can only be used with a proper UniFFI pointer
|
||||||
|
const uniffiObjectPtr = Symbol("uniffiObjectPtr");
|
||||||
|
const constructUniffiObject = Symbol("constructUniffiObject");
|
||||||
|
UnitTestObjs.uniffiObjectPtr = uniffiObjectPtr;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler for a single UniFFI CallbackInterface
|
||||||
|
*
|
||||||
|
* This class stores objects that implement a callback interface in a handle
|
||||||
|
* map, allowing them to be referenced by the Rust code using an integer
|
||||||
|
* handle.
|
||||||
|
*
|
||||||
|
* While the callback object is stored in the map, it allows the Rust code to
|
||||||
|
* call methods on the object using the callback object handle, a method id,
|
||||||
|
* and an ArrayBuffer packed with the method arguments.
|
||||||
|
*
|
||||||
|
* When the Rust code drops its reference, it sends a call with the methodId=0,
|
||||||
|
* which causes callback object to be removed from the map.
|
||||||
|
*/
|
||||||
|
class UniFFICallbackHandler {
|
||||||
|
#name;
|
||||||
|
#interfaceId;
|
||||||
|
#handleCounter;
|
||||||
|
#handleMap;
|
||||||
|
#methodHandlers;
|
||||||
|
#allowNewCallbacks
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a UniFFICallbackHandler
|
||||||
|
* @param {string} name - Human-friendly name for this callback interface
|
||||||
|
* @param {int} interfaceId - Interface ID for this CallbackInterface.
|
||||||
|
* @param {UniFFICallbackMethodHandler[]} methodHandlers -- UniFFICallbackHandler for each method, in the same order as the UDL file
|
||||||
|
*/
|
||||||
|
constructor(name, interfaceId, methodHandlers) {
|
||||||
|
this.#name = name;
|
||||||
|
this.#interfaceId = interfaceId;
|
||||||
|
this.#handleCounter = 0;
|
||||||
|
this.#handleMap = new Map();
|
||||||
|
this.#methodHandlers = methodHandlers;
|
||||||
|
this.#allowNewCallbacks = true;
|
||||||
|
|
||||||
|
UniFFIScaffolding.registerCallbackHandler(this.#interfaceId, this);
|
||||||
|
Services.obs.addObserver(this, "xpcom-shutdown");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a callback object in the handle map and return the handle
|
||||||
|
*
|
||||||
|
* @param {obj} callbackObj - Object that implements the callback interface
|
||||||
|
* @returns {int} - Handle for this callback object, this is what gets passed back to Rust.
|
||||||
|
*/
|
||||||
|
storeCallbackObj(callbackObj) {
|
||||||
|
if (!this.#allowNewCallbacks) {
|
||||||
|
throw new UniFFIError(`No new callbacks allowed for ${this.#name}`);
|
||||||
|
}
|
||||||
|
const handle = this.#handleCounter;
|
||||||
|
this.#handleCounter += 1;
|
||||||
|
this.#handleMap.set(handle, new UniFFICallbackHandleMapEntry(callbackObj, Components.stack.caller.formattedStack.trim()));
|
||||||
|
return handle;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a previously stored callback object
|
||||||
|
*
|
||||||
|
* @param {int} handle - Callback object handle, returned from `storeCallbackObj()`
|
||||||
|
* @returns {obj} - Callback object
|
||||||
|
*/
|
||||||
|
getCallbackObj(handle) {
|
||||||
|
return this.#handleMap.get(handle).callbackObj;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set if new callbacks are allowed for this handler
|
||||||
|
*
|
||||||
|
* This is called with false during shutdown to ensure the callback maps don't
|
||||||
|
* prevent JS objects from being GCed.
|
||||||
|
*/
|
||||||
|
setAllowNewCallbacks(allow) {
|
||||||
|
this.#allowNewCallbacks = allow
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check that no callbacks are currently registered
|
||||||
|
*
|
||||||
|
* If there are callbacks registered a UniFFIError will be thrown. This is
|
||||||
|
* called during shutdown to generate an alert if there are leaked callback
|
||||||
|
* interfaces.
|
||||||
|
*/
|
||||||
|
assertNoRegisteredCallbacks() {
|
||||||
|
if (this.#handleMap.size > 0) {
|
||||||
|
const entry = this.#handleMap.values().next().value;
|
||||||
|
throw new UniFFIError(`UniFFI interface ${this.#name} has ${this.#handleMap.size} registered callbacks at xpcom-shutdown. This likely indicates a UniFFI callback leak.\nStack trace for the first leaked callback:\n${entry.stackTrace}.`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invoke a method on a stored callback object
|
||||||
|
* @param {int} handle - Object handle
|
||||||
|
* @param {int} methodId - Method index (0-based)
|
||||||
|
* @param {UniFFIScaffoldingValue[]} args - Arguments to pass to the method
|
||||||
|
*/
|
||||||
|
call(handle, methodId, ...args) {
|
||||||
|
try {
|
||||||
|
this.#invokeCallbackInner(handle, methodId, args);
|
||||||
|
} catch (e) {
|
||||||
|
console.error(`internal error invoking callback: ${e}`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destroy a stored callback object
|
||||||
|
* @param {int} handle - Object handle
|
||||||
|
*/
|
||||||
|
destroy(handle) {
|
||||||
|
this.#handleMap.delete(handle);
|
||||||
|
}
|
||||||
|
|
||||||
|
#invokeCallbackInner(handle, methodId, args) {
|
||||||
|
const callbackObj = this.getCallbackObj(handle);
|
||||||
|
if (callbackObj === undefined) {
|
||||||
|
throw new UniFFIError(`${this.#name}: invalid callback handle id: ${handle}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the method data, converting from 1-based indexing
|
||||||
|
const methodHandler = this.#methodHandlers[methodId];
|
||||||
|
if (methodHandler === undefined) {
|
||||||
|
throw new UniFFIError(`${this.#name}: invalid method id: ${methodId}`)
|
||||||
|
}
|
||||||
|
|
||||||
|
methodHandler.call(callbackObj, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xpcom-shutdown observer method
|
||||||
|
*
|
||||||
|
* This handles:
|
||||||
|
* - Deregistering ourselves as the UniFFI callback handler
|
||||||
|
* - Checks for any leftover stored callbacks which indicate memory leaks
|
||||||
|
*/
|
||||||
|
observe(aSubject, aTopic, aData) {
|
||||||
|
if (aTopic == "xpcom-shutdown") {
|
||||||
|
try {
|
||||||
|
this.setAllowNewCallbacks(false);
|
||||||
|
this.assertNoRegisteredCallbacks();
|
||||||
|
UniFFIScaffolding.deregisterCallbackHandler(this.#interfaceId);
|
||||||
|
} catch (ex) {
|
||||||
|
console.error(`UniFFI Callback interface error during xpcom-shutdown: ${ex}`);
|
||||||
|
Cc["@mozilla.org/xpcom/debug;1"]
|
||||||
|
.getService(Ci.nsIDebug2)
|
||||||
|
.abort(ex.filename, ex.lineNumber);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles calling a single method for a callback interface
|
||||||
|
*/
|
||||||
|
class UniFFICallbackMethodHandler {
|
||||||
|
#name;
|
||||||
|
#argsConverters;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a UniFFICallbackMethodHandler
|
||||||
|
|
||||||
|
* @param {string} name -- Name of the method to call on the callback object
|
||||||
|
* @param {FfiConverter[]} argsConverters - FfiConverter for each argument type
|
||||||
|
*/
|
||||||
|
constructor(name, argsConverters) {
|
||||||
|
this.#name = name;
|
||||||
|
this.#argsConverters = argsConverters;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invoke the method
|
||||||
|
*
|
||||||
|
* @param {obj} callbackObj -- Object implementing the callback interface for this method
|
||||||
|
* @param {ArrayBuffer} argsArrayBuffer -- Arguments for the method, packed in an ArrayBuffer
|
||||||
|
*/
|
||||||
|
call(callbackObj, args) {
|
||||||
|
const convertedArgs = this.#argsConverters.map((converter, i) => converter.lift(args[i]));
|
||||||
|
return callbackObj[this.#name](...convertedArgs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UniFFICallbackHandler.handleMap entry
|
||||||
|
*
|
||||||
|
* @property callbackObj - Callback object, this must implement the callback interface.
|
||||||
|
* @property {string} stackTrace - Stack trace from when the callback object was registered. This is used to proved extra context when debugging leaked callback objects.
|
||||||
|
*/
|
||||||
|
class UniFFICallbackHandleMapEntry {
|
||||||
|
constructor(callbackObj, stackTrace) {
|
||||||
|
this.callbackObj = callbackObj;
|
||||||
|
this.stackTrace = stackTrace
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Export the FFIConverter object to make external types work.
|
||||||
|
export class FfiConverterU8 extends FfiConverter {
|
||||||
|
static checkType(value) {
|
||||||
|
super.checkType(value);
|
||||||
|
if (!Number.isInteger(value)) {
|
||||||
|
throw new UniFFITypeError(`${value} is not an integer`);
|
||||||
|
}
|
||||||
|
if (value < 0 || value > 256) {
|
||||||
|
throw new UniFFITypeError(`${value} exceeds the U8 bounds`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
static computeSize(_value) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
static lift(value) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
static lower(value) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
static write(dataStream, value) {
|
||||||
|
dataStream.writeUint8(value)
|
||||||
|
}
|
||||||
|
static read(dataStream) {
|
||||||
|
return dataStream.readUint8()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Export the FFIConverter object to make external types work.
|
||||||
|
export class FfiConverterI64 extends FfiConverter {
|
||||||
|
static checkType(value) {
|
||||||
|
super.checkType(value);
|
||||||
|
if (!Number.isSafeInteger(value)) {
|
||||||
|
throw new UniFFITypeError(`${value} exceeds the safe integer bounds`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
static computeSize(_value) {
|
||||||
|
return 8;
|
||||||
|
}
|
||||||
|
static lift(value) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
static lower(value) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
static write(dataStream, value) {
|
||||||
|
dataStream.writeInt64(value)
|
||||||
|
}
|
||||||
|
static read(dataStream) {
|
||||||
|
return dataStream.readInt64()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Export the FFIConverter object to make external types work.
|
||||||
|
export class FfiConverterBool extends FfiConverter {
|
||||||
|
static computeSize(_value) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
static lift(value) {
|
||||||
|
return value == 1;
|
||||||
|
}
|
||||||
|
static lower(value) {
|
||||||
|
if (value) {
|
||||||
|
return 1;
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
static write(dataStream, value) {
|
||||||
|
dataStream.writeUint8(this.lower(value))
|
||||||
|
}
|
||||||
|
static read(dataStream) {
|
||||||
|
return this.lift(dataStream.readUint8())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Export the FFIConverter object to make external types work.
|
||||||
|
export class FfiConverterString extends FfiConverter {
|
||||||
|
static checkType(value) {
|
||||||
|
super.checkType(value);
|
||||||
|
if (typeof value !== "string") {
|
||||||
|
throw new UniFFITypeError(`${value} is not a string`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static lift(buf) {
|
||||||
|
const decoder = new TextDecoder();
|
||||||
|
const utf8Arr = new Uint8Array(buf);
|
||||||
|
return decoder.decode(utf8Arr);
|
||||||
|
}
|
||||||
|
static lower(value) {
|
||||||
|
const encoder = new TextEncoder();
|
||||||
|
return encoder.encode(value).buffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
static write(dataStream, value) {
|
||||||
|
dataStream.writeString(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
static read(dataStream) {
|
||||||
|
return dataStream.readString();
|
||||||
|
}
|
||||||
|
|
||||||
|
static computeSize(value) {
|
||||||
|
const encoder = new TextEncoder();
|
||||||
|
return 4 + encoder.encode(value).length
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Top-level API for the context_id component
|
||||||
|
*/
|
||||||
|
export class ContextIdComponent {
|
||||||
|
// Use `init` to instantiate this class.
|
||||||
|
// DO NOT USE THIS CONSTRUCTOR DIRECTLY
|
||||||
|
constructor(opts) {
|
||||||
|
if (!Object.prototype.hasOwnProperty.call(opts, constructUniffiObject)) {
|
||||||
|
throw new UniFFIError("Attempting to construct an object using the JavaScript constructor directly" +
|
||||||
|
"Please use a UDL defined constructor, or the init function for the primary constructor")
|
||||||
|
}
|
||||||
|
if (!(opts[constructUniffiObject] instanceof UniFFIPointer)) {
|
||||||
|
throw new UniFFIError("Attempting to create a UniFFI object with a pointer that is not an instance of UniFFIPointer")
|
||||||
|
}
|
||||||
|
this[uniffiObjectPtr] = opts[constructUniffiObject];
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Construct a new [ContextIDComponent].
|
||||||
|
*
|
||||||
|
* If no creation timestamp is provided, the current time will be used.
|
||||||
|
* @returns {ContextIdComponent}
|
||||||
|
*/
|
||||||
|
static init(initContextId,creationTimestampS,runningInTestAutomation,callback) {
|
||||||
|
const liftResult = (result) => FfiConverterTypeContextIdComponent.lift(result);
|
||||||
|
const liftError = (data) => FfiConverterTypeApiError.lift(data);
|
||||||
|
const functionCall = () => {
|
||||||
|
try {
|
||||||
|
FfiConverterString.checkType(initContextId)
|
||||||
|
} catch (e) {
|
||||||
|
if (e instanceof UniFFITypeError) {
|
||||||
|
e.addItemDescriptionPart("initContextId");
|
||||||
|
}
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
FfiConverterI64.checkType(creationTimestampS)
|
||||||
|
} catch (e) {
|
||||||
|
if (e instanceof UniFFITypeError) {
|
||||||
|
e.addItemDescriptionPart("creationTimestampS");
|
||||||
|
}
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
FfiConverterBool.checkType(runningInTestAutomation)
|
||||||
|
} catch (e) {
|
||||||
|
if (e instanceof UniFFITypeError) {
|
||||||
|
e.addItemDescriptionPart("runningInTestAutomation");
|
||||||
|
}
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
FfiConverterTypeContextIdCallback.checkType(callback)
|
||||||
|
} catch (e) {
|
||||||
|
if (e instanceof UniFFITypeError) {
|
||||||
|
e.addItemDescriptionPart("callback");
|
||||||
|
}
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
return UniFFIScaffolding.callSync(
|
||||||
|
3, // context_id:uniffi_context_id_fn_constructor_contextidcomponent_new
|
||||||
|
FfiConverterString.lower(initContextId),
|
||||||
|
FfiConverterI64.lower(creationTimestampS),
|
||||||
|
FfiConverterBool.lower(runningInTestAutomation),
|
||||||
|
FfiConverterTypeContextIdCallback.lower(callback),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
return handleRustResult(functionCall(), liftResult, liftError);}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Regenerate the context ID.
|
||||||
|
*/
|
||||||
|
forceRotation() {
|
||||||
|
const liftResult = (result) => undefined;
|
||||||
|
const liftError = (data) => FfiConverterTypeApiError.lift(data);
|
||||||
|
const functionCall = () => {
|
||||||
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
|
0, // context_id:uniffi_context_id_fn_method_contextidcomponent_force_rotation
|
||||||
|
FfiConverterTypeContextIdComponent.lower(this),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
return functionCall().then((result) => handleRustResult(result, liftResult, liftError));
|
||||||
|
} catch (error) {
|
||||||
|
return Promise.reject(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the current context ID string.
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
request(rotationDaysInS) {
|
||||||
|
const liftResult = (result) => FfiConverterString.lift(result);
|
||||||
|
const liftError = (data) => FfiConverterTypeApiError.lift(data);
|
||||||
|
const functionCall = () => {
|
||||||
|
try {
|
||||||
|
FfiConverterU8.checkType(rotationDaysInS)
|
||||||
|
} catch (e) {
|
||||||
|
if (e instanceof UniFFITypeError) {
|
||||||
|
e.addItemDescriptionPart("rotationDaysInS");
|
||||||
|
}
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
|
1, // context_id:uniffi_context_id_fn_method_contextidcomponent_request
|
||||||
|
FfiConverterTypeContextIdComponent.lower(this),
|
||||||
|
FfiConverterU8.lower(rotationDaysInS),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
return functionCall().then((result) => handleRustResult(result, liftResult, liftError));
|
||||||
|
} catch (error) {
|
||||||
|
return Promise.reject(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unset the callbacks set during construction, and use a default
|
||||||
|
* no-op ContextIdCallback instead.
|
||||||
|
*/
|
||||||
|
unsetCallback() {
|
||||||
|
const liftResult = (result) => undefined;
|
||||||
|
const liftError = (data) => FfiConverterTypeApiError.lift(data);
|
||||||
|
const functionCall = () => {
|
||||||
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
|
2, // context_id:uniffi_context_id_fn_method_contextidcomponent_unset_callback
|
||||||
|
FfiConverterTypeContextIdComponent.lower(this),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
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 class FfiConverterTypeContextIdComponent extends FfiConverter {
|
||||||
|
static lift(value) {
|
||||||
|
const opts = {};
|
||||||
|
opts[constructUniffiObject] = value;
|
||||||
|
return new ContextIdComponent(opts);
|
||||||
|
}
|
||||||
|
|
||||||
|
static lower(value) {
|
||||||
|
const ptr = value[uniffiObjectPtr];
|
||||||
|
if (!(ptr instanceof UniFFIPointer)) {
|
||||||
|
throw new UniFFITypeError("Object is not a 'ContextIdComponent' instance");
|
||||||
|
}
|
||||||
|
return ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
static read(dataStream) {
|
||||||
|
return this.lift(dataStream.readPointerContextIdComponent());
|
||||||
|
}
|
||||||
|
|
||||||
|
static write(dataStream, value) {
|
||||||
|
dataStream.writePointerContextIdComponent(value[uniffiObjectPtr]);
|
||||||
|
}
|
||||||
|
|
||||||
|
static computeSize(value) {
|
||||||
|
return 8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ApiError
|
||||||
|
*/
|
||||||
|
export class ApiError extends Error {}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Other
|
||||||
|
*/
|
||||||
|
export class Other extends ApiError {
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
reason,
|
||||||
|
...params
|
||||||
|
) {
|
||||||
|
const message = `reason: ${ reason }`;
|
||||||
|
super(message, ...params);
|
||||||
|
this.reason = reason;
|
||||||
|
}
|
||||||
|
toString() {
|
||||||
|
return `Other: ${super.toString()}`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Export the FFIConverter object to make external types work.
|
||||||
|
export class FfiConverterTypeApiError extends FfiConverterArrayBuffer {
|
||||||
|
static read(dataStream) {
|
||||||
|
switch (dataStream.readInt32()) {
|
||||||
|
case 1:
|
||||||
|
return new Other(
|
||||||
|
FfiConverterString.read(dataStream)
|
||||||
|
);
|
||||||
|
default:
|
||||||
|
throw new UniFFITypeError("Unknown ApiError variant");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
static computeSize(value) {
|
||||||
|
// Size of the Int indicating the variant
|
||||||
|
let totalSize = 4;
|
||||||
|
if (value instanceof Other) {
|
||||||
|
totalSize += FfiConverterString.computeSize(value.reason);
|
||||||
|
return totalSize;
|
||||||
|
}
|
||||||
|
throw new UniFFITypeError("Unknown ApiError variant");
|
||||||
|
}
|
||||||
|
static write(dataStream, value) {
|
||||||
|
if (value instanceof Other) {
|
||||||
|
dataStream.writeInt32(1);
|
||||||
|
FfiConverterString.write(dataStream, value.reason);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
throw new UniFFITypeError("Unknown ApiError variant");
|
||||||
|
}
|
||||||
|
|
||||||
|
static errorClass = ApiError;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Export the FFIConverter object to make external types work.
|
||||||
|
export class FfiConverterTypeContextIdCallback extends FfiConverter {
|
||||||
|
static lower(callbackObj) {
|
||||||
|
return callbackHandlerContextIdCallback.storeCallbackObj(callbackObj)
|
||||||
|
}
|
||||||
|
|
||||||
|
static lift(handleId) {
|
||||||
|
return callbackHandlerContextIdCallback.getCallbackObj(handleId)
|
||||||
|
}
|
||||||
|
|
||||||
|
static read(dataStream) {
|
||||||
|
return this.lift(dataStream.readInt64())
|
||||||
|
}
|
||||||
|
|
||||||
|
static write(dataStream, callbackObj) {
|
||||||
|
dataStream.writeInt64(this.lower(callbackObj))
|
||||||
|
}
|
||||||
|
|
||||||
|
static computeSize(callbackObj) {
|
||||||
|
return 8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Define callback interface handlers, this must come after the type loop since they reference the FfiConverters defined above.
|
||||||
|
|
||||||
|
const callbackHandlerContextIdCallback = new UniFFICallbackHandler(
|
||||||
|
"context_id:ContextIdCallback",
|
||||||
|
0,
|
||||||
|
[
|
||||||
|
new UniFFICallbackMethodHandler(
|
||||||
|
"persist",
|
||||||
|
[
|
||||||
|
FfiConverterString,
|
||||||
|
FfiConverterI64,
|
||||||
|
],
|
||||||
|
),
|
||||||
|
new UniFFICallbackMethodHandler(
|
||||||
|
"rotated",
|
||||||
|
[
|
||||||
|
FfiConverterString,
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
// Allow the shutdown-related functionality to be tested in the unit tests
|
||||||
|
UnitTestObjs.callbackHandlerContextIdCallback = callbackHandlerContextIdCallback;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -549,7 +549,7 @@ export class FfiConverterTypeApplicationErrorReporter extends FfiConverter {
|
|||||||
|
|
||||||
const callbackHandlerApplicationErrorReporter = new UniFFICallbackHandler(
|
const callbackHandlerApplicationErrorReporter = new UniFFICallbackHandler(
|
||||||
"errorsupport:ApplicationErrorReporter",
|
"errorsupport:ApplicationErrorReporter",
|
||||||
0,
|
1,
|
||||||
[
|
[
|
||||||
new UniFFICallbackMethodHandler(
|
new UniFFICallbackMethodHandler(
|
||||||
"reportError",
|
"reportError",
|
||||||
@@ -594,7 +594,7 @@ export function setApplicationErrorReporter(errorReporter) {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
0, // errorsupport:uniffi_error_support_fn_func_set_application_error_reporter
|
4, // errorsupport:uniffi_error_support_fn_func_set_application_error_reporter
|
||||||
FfiConverterTypeApplicationErrorReporter.lower(errorReporter),
|
FfiConverterTypeApplicationErrorReporter.lower(errorReporter),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -615,7 +615,7 @@ export function unsetApplicationErrorReporter() {
|
|||||||
const liftError = null;
|
const liftError = null;
|
||||||
const functionCall = () => {
|
const functionCall = () => {
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
1, // errorsupport:uniffi_error_support_fn_func_unset_application_error_reporter
|
5, // errorsupport:uniffi_error_support_fn_func_unset_application_error_reporter
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
readPointerRelevancyStore() {
|
readPointerRelevancyStore() {
|
||||||
const pointerId = 0; // relevancy:RelevancyStore
|
const pointerId = 1; // relevancy:RelevancyStore
|
||||||
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
return res;
|
return res;
|
||||||
@@ -182,7 +182,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
writePointerRelevancyStore(value) {
|
writePointerRelevancyStore(value) {
|
||||||
const pointerId = 0; // relevancy:RelevancyStore
|
const pointerId = 1; // relevancy:RelevancyStore
|
||||||
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
}
|
}
|
||||||
@@ -459,7 +459,7 @@ export class RelevancyStore {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callSync(
|
return UniFFIScaffolding.callSync(
|
||||||
12, // relevancy:uniffi_relevancy_fn_constructor_relevancystore_new
|
16, // relevancy:uniffi_relevancy_fn_constructor_relevancystore_new
|
||||||
FfiConverterString.lower(dbPath),
|
FfiConverterString.lower(dbPath),
|
||||||
FfiConverterTypeRemoteSettingsService.lower(remoteSettings),
|
FfiConverterTypeRemoteSettingsService.lower(remoteSettings),
|
||||||
)
|
)
|
||||||
@@ -495,7 +495,7 @@ export class RelevancyStore {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
3, // relevancy:uniffi_relevancy_fn_method_relevancystore_bandit_init
|
7, // relevancy:uniffi_relevancy_fn_method_relevancystore_bandit_init
|
||||||
FfiConverterTypeRelevancyStore.lower(this),
|
FfiConverterTypeRelevancyStore.lower(this),
|
||||||
FfiConverterString.lower(bandit),
|
FfiConverterString.lower(bandit),
|
||||||
FfiConverterSequencestring.lower(arms),
|
FfiConverterSequencestring.lower(arms),
|
||||||
@@ -539,7 +539,7 @@ export class RelevancyStore {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
4, // relevancy:uniffi_relevancy_fn_method_relevancystore_bandit_select
|
8, // relevancy:uniffi_relevancy_fn_method_relevancystore_bandit_select
|
||||||
FfiConverterTypeRelevancyStore.lower(this),
|
FfiConverterTypeRelevancyStore.lower(this),
|
||||||
FfiConverterString.lower(bandit),
|
FfiConverterString.lower(bandit),
|
||||||
FfiConverterSequencestring.lower(arms),
|
FfiConverterSequencestring.lower(arms),
|
||||||
@@ -590,7 +590,7 @@ export class RelevancyStore {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
5, // relevancy:uniffi_relevancy_fn_method_relevancystore_bandit_update
|
9, // relevancy:uniffi_relevancy_fn_method_relevancystore_bandit_update
|
||||||
FfiConverterTypeRelevancyStore.lower(this),
|
FfiConverterTypeRelevancyStore.lower(this),
|
||||||
FfiConverterString.lower(bandit),
|
FfiConverterString.lower(bandit),
|
||||||
FfiConverterString.lower(arm),
|
FfiConverterString.lower(arm),
|
||||||
@@ -614,7 +614,7 @@ export class RelevancyStore {
|
|||||||
const liftError = null;
|
const liftError = null;
|
||||||
const functionCall = () => {
|
const functionCall = () => {
|
||||||
return UniFFIScaffolding.callSync(
|
return UniFFIScaffolding.callSync(
|
||||||
6, // relevancy:uniffi_relevancy_fn_method_relevancystore_close
|
10, // relevancy:uniffi_relevancy_fn_method_relevancystore_close
|
||||||
FfiConverterTypeRelevancyStore.lower(this),
|
FfiConverterTypeRelevancyStore.lower(this),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -629,7 +629,7 @@ export class RelevancyStore {
|
|||||||
const liftError = (data) => FfiConverterTypeRelevancyApiError.lift(data);
|
const liftError = (data) => FfiConverterTypeRelevancyApiError.lift(data);
|
||||||
const functionCall = () => {
|
const functionCall = () => {
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
7, // relevancy:uniffi_relevancy_fn_method_relevancystore_ensure_interest_data_populated
|
11, // relevancy:uniffi_relevancy_fn_method_relevancystore_ensure_interest_data_populated
|
||||||
FfiConverterTypeRelevancyStore.lower(this),
|
FfiConverterTypeRelevancyStore.lower(this),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -665,7 +665,7 @@ export class RelevancyStore {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
8, // relevancy:uniffi_relevancy_fn_method_relevancystore_get_bandit_data
|
12, // relevancy:uniffi_relevancy_fn_method_relevancystore_get_bandit_data
|
||||||
FfiConverterTypeRelevancyStore.lower(this),
|
FfiConverterTypeRelevancyStore.lower(this),
|
||||||
FfiConverterString.lower(bandit),
|
FfiConverterString.lower(bandit),
|
||||||
FfiConverterString.lower(arm),
|
FfiConverterString.lower(arm),
|
||||||
@@ -705,7 +705,7 @@ export class RelevancyStore {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
9, // relevancy:uniffi_relevancy_fn_method_relevancystore_ingest
|
13, // relevancy:uniffi_relevancy_fn_method_relevancystore_ingest
|
||||||
FfiConverterTypeRelevancyStore.lower(this),
|
FfiConverterTypeRelevancyStore.lower(this),
|
||||||
FfiConverterSequencestring.lower(topUrlsByFrecency),
|
FfiConverterSequencestring.lower(topUrlsByFrecency),
|
||||||
)
|
)
|
||||||
@@ -725,7 +725,7 @@ export class RelevancyStore {
|
|||||||
const liftError = null;
|
const liftError = null;
|
||||||
const functionCall = () => {
|
const functionCall = () => {
|
||||||
return UniFFIScaffolding.callSync(
|
return UniFFIScaffolding.callSync(
|
||||||
10, // relevancy:uniffi_relevancy_fn_method_relevancystore_interrupt
|
14, // relevancy:uniffi_relevancy_fn_method_relevancystore_interrupt
|
||||||
FfiConverterTypeRelevancyStore.lower(this),
|
FfiConverterTypeRelevancyStore.lower(this),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -744,7 +744,7 @@ export class RelevancyStore {
|
|||||||
const liftError = (data) => FfiConverterTypeRelevancyApiError.lift(data);
|
const liftError = (data) => FfiConverterTypeRelevancyApiError.lift(data);
|
||||||
const functionCall = () => {
|
const functionCall = () => {
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
11, // relevancy:uniffi_relevancy_fn_method_relevancystore_user_interest_vector
|
15, // relevancy:uniffi_relevancy_fn_method_relevancystore_user_interest_vector
|
||||||
FfiConverterTypeRelevancyStore.lower(this),
|
FfiConverterTypeRelevancyStore.lower(this),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -2008,7 +2008,7 @@ export function score(interestVector,contentCategories) {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callSync(
|
return UniFFIScaffolding.callSync(
|
||||||
2, // relevancy:uniffi_relevancy_fn_func_score
|
6, // relevancy:uniffi_relevancy_fn_func_score
|
||||||
FfiConverterTypeInterestVector.lower(interestVector),
|
FfiConverterTypeInterestVector.lower(interestVector),
|
||||||
FfiConverterSequenceTypeInterest.lower(contentCategories),
|
FfiConverterSequenceTypeInterest.lower(contentCategories),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
readPointerRemoteSettings() {
|
readPointerRemoteSettings() {
|
||||||
const pointerId = 1; // remote_settings:RemoteSettings
|
const pointerId = 2; // remote_settings:RemoteSettings
|
||||||
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
return res;
|
return res;
|
||||||
@@ -182,7 +182,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
writePointerRemoteSettings(value) {
|
writePointerRemoteSettings(value) {
|
||||||
const pointerId = 1; // remote_settings:RemoteSettings
|
const pointerId = 2; // remote_settings:RemoteSettings
|
||||||
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
}
|
}
|
||||||
@@ -192,7 +192,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
readPointerRemoteSettingsClient() {
|
readPointerRemoteSettingsClient() {
|
||||||
const pointerId = 2; // remote_settings:RemoteSettingsClient
|
const pointerId = 3; // remote_settings:RemoteSettingsClient
|
||||||
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
return res;
|
return res;
|
||||||
@@ -202,7 +202,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
writePointerRemoteSettingsClient(value) {
|
writePointerRemoteSettingsClient(value) {
|
||||||
const pointerId = 2; // remote_settings:RemoteSettingsClient
|
const pointerId = 3; // remote_settings:RemoteSettingsClient
|
||||||
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
}
|
}
|
||||||
@@ -212,7 +212,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
readPointerRemoteSettingsService() {
|
readPointerRemoteSettingsService() {
|
||||||
const pointerId = 3; // remote_settings:RemoteSettingsService
|
const pointerId = 4; // remote_settings:RemoteSettingsService
|
||||||
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
return res;
|
return res;
|
||||||
@@ -222,7 +222,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
writePointerRemoteSettingsService(value) {
|
writePointerRemoteSettingsService(value) {
|
||||||
const pointerId = 3; // remote_settings:RemoteSettingsService
|
const pointerId = 4; // remote_settings:RemoteSettingsService
|
||||||
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
}
|
}
|
||||||
@@ -464,7 +464,7 @@ export class RemoteSettings {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callSync(
|
return UniFFIScaffolding.callSync(
|
||||||
16, // remote_settings:uniffi_remote_settings_fn_constructor_remotesettings_new
|
20, // remote_settings:uniffi_remote_settings_fn_constructor_remotesettings_new
|
||||||
FfiConverterTypeRemoteSettingsConfig.lower(remoteSettingsConfig),
|
FfiConverterTypeRemoteSettingsConfig.lower(remoteSettingsConfig),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -494,7 +494,7 @@ export class RemoteSettings {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
13, // remote_settings:uniffi_remote_settings_fn_method_remotesettings_download_attachment_to_path
|
17, // remote_settings:uniffi_remote_settings_fn_method_remotesettings_download_attachment_to_path
|
||||||
FfiConverterTypeRemoteSettings.lower(this),
|
FfiConverterTypeRemoteSettings.lower(this),
|
||||||
FfiConverterString.lower(attachmentId),
|
FfiConverterString.lower(attachmentId),
|
||||||
FfiConverterString.lower(path),
|
FfiConverterString.lower(path),
|
||||||
@@ -516,7 +516,7 @@ export class RemoteSettings {
|
|||||||
const liftError = (data) => FfiConverterTypeRemoteSettingsError.lift(data);
|
const liftError = (data) => FfiConverterTypeRemoteSettingsError.lift(data);
|
||||||
const functionCall = () => {
|
const functionCall = () => {
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
14, // remote_settings:uniffi_remote_settings_fn_method_remotesettings_get_records
|
18, // remote_settings:uniffi_remote_settings_fn_method_remotesettings_get_records
|
||||||
FfiConverterTypeRemoteSettings.lower(this),
|
FfiConverterTypeRemoteSettings.lower(this),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -545,7 +545,7 @@ export class RemoteSettings {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
15, // remote_settings:uniffi_remote_settings_fn_method_remotesettings_get_records_since
|
19, // remote_settings:uniffi_remote_settings_fn_method_remotesettings_get_records_since
|
||||||
FfiConverterTypeRemoteSettings.lower(this),
|
FfiConverterTypeRemoteSettings.lower(this),
|
||||||
FfiConverterU64.lower(timestamp),
|
FfiConverterU64.lower(timestamp),
|
||||||
)
|
)
|
||||||
@@ -616,7 +616,7 @@ export class RemoteSettingsClient {
|
|||||||
const liftError = null;
|
const liftError = null;
|
||||||
const functionCall = () => {
|
const functionCall = () => {
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
17, // remote_settings:uniffi_remote_settings_fn_method_remotesettingsclient_collection_name
|
21, // remote_settings:uniffi_remote_settings_fn_method_remotesettingsclient_collection_name
|
||||||
FfiConverterTypeRemoteSettingsClient.lower(this),
|
FfiConverterTypeRemoteSettingsClient.lower(this),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -652,7 +652,7 @@ export class RemoteSettingsClient {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
18, // remote_settings:uniffi_remote_settings_fn_method_remotesettingsclient_get_attachment
|
22, // remote_settings:uniffi_remote_settings_fn_method_remotesettingsclient_get_attachment
|
||||||
FfiConverterTypeRemoteSettingsClient.lower(this),
|
FfiConverterTypeRemoteSettingsClient.lower(this),
|
||||||
FfiConverterTypeRemoteSettingsRecord.lower(record),
|
FfiConverterTypeRemoteSettingsRecord.lower(record),
|
||||||
)
|
)
|
||||||
@@ -696,7 +696,7 @@ export class RemoteSettingsClient {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
19, // remote_settings:uniffi_remote_settings_fn_method_remotesettingsclient_get_records
|
23, // remote_settings:uniffi_remote_settings_fn_method_remotesettingsclient_get_records
|
||||||
FfiConverterTypeRemoteSettingsClient.lower(this),
|
FfiConverterTypeRemoteSettingsClient.lower(this),
|
||||||
FfiConverterBool.lower(syncIfEmpty),
|
FfiConverterBool.lower(syncIfEmpty),
|
||||||
)
|
)
|
||||||
@@ -728,7 +728,7 @@ export class RemoteSettingsClient {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
20, // remote_settings:uniffi_remote_settings_fn_method_remotesettingsclient_get_records_map
|
24, // remote_settings:uniffi_remote_settings_fn_method_remotesettingsclient_get_records_map
|
||||||
FfiConverterTypeRemoteSettingsClient.lower(this),
|
FfiConverterTypeRemoteSettingsClient.lower(this),
|
||||||
FfiConverterBool.lower(syncIfEmpty),
|
FfiConverterBool.lower(syncIfEmpty),
|
||||||
)
|
)
|
||||||
@@ -748,7 +748,7 @@ export class RemoteSettingsClient {
|
|||||||
const liftError = null;
|
const liftError = null;
|
||||||
const functionCall = () => {
|
const functionCall = () => {
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
21, // remote_settings:uniffi_remote_settings_fn_method_remotesettingsclient_shutdown
|
25, // remote_settings:uniffi_remote_settings_fn_method_remotesettingsclient_shutdown
|
||||||
FfiConverterTypeRemoteSettingsClient.lower(this),
|
FfiConverterTypeRemoteSettingsClient.lower(this),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -767,7 +767,7 @@ export class RemoteSettingsClient {
|
|||||||
const liftError = (data) => FfiConverterTypeRemoteSettingsError.lift(data);
|
const liftError = (data) => FfiConverterTypeRemoteSettingsError.lift(data);
|
||||||
const functionCall = () => {
|
const functionCall = () => {
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
22, // remote_settings:uniffi_remote_settings_fn_method_remotesettingsclient_sync
|
26, // remote_settings:uniffi_remote_settings_fn_method_remotesettingsclient_sync
|
||||||
FfiConverterTypeRemoteSettingsClient.lower(this),
|
FfiConverterTypeRemoteSettingsClient.lower(this),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -862,7 +862,7 @@ export class RemoteSettingsService {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callSync(
|
return UniFFIScaffolding.callSync(
|
||||||
26, // remote_settings:uniffi_remote_settings_fn_constructor_remotesettingsservice_new
|
30, // remote_settings:uniffi_remote_settings_fn_constructor_remotesettingsservice_new
|
||||||
FfiConverterString.lower(storageDir),
|
FfiConverterString.lower(storageDir),
|
||||||
FfiConverterTypeRemoteSettingsConfig2.lower(config),
|
FfiConverterTypeRemoteSettingsConfig2.lower(config),
|
||||||
)
|
)
|
||||||
@@ -888,7 +888,7 @@ export class RemoteSettingsService {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
23, // remote_settings:uniffi_remote_settings_fn_method_remotesettingsservice_make_client
|
27, // remote_settings:uniffi_remote_settings_fn_method_remotesettingsservice_make_client
|
||||||
FfiConverterTypeRemoteSettingsService.lower(this),
|
FfiConverterTypeRemoteSettingsService.lower(this),
|
||||||
FfiConverterString.lower(collectionName),
|
FfiConverterString.lower(collectionName),
|
||||||
)
|
)
|
||||||
@@ -909,7 +909,7 @@ export class RemoteSettingsService {
|
|||||||
const liftError = (data) => FfiConverterTypeRemoteSettingsError.lift(data);
|
const liftError = (data) => FfiConverterTypeRemoteSettingsError.lift(data);
|
||||||
const functionCall = () => {
|
const functionCall = () => {
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
24, // remote_settings:uniffi_remote_settings_fn_method_remotesettingsservice_sync
|
28, // remote_settings:uniffi_remote_settings_fn_method_remotesettingsservice_sync
|
||||||
FfiConverterTypeRemoteSettingsService.lower(this),
|
FfiConverterTypeRemoteSettingsService.lower(this),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -942,7 +942,7 @@ export class RemoteSettingsService {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
25, // remote_settings:uniffi_remote_settings_fn_method_remotesettingsservice_update_config
|
29, // remote_settings:uniffi_remote_settings_fn_method_remotesettingsservice_update_config
|
||||||
FfiConverterTypeRemoteSettingsService.lower(this),
|
FfiConverterTypeRemoteSettingsService.lower(this),
|
||||||
FfiConverterTypeRemoteSettingsConfig2.lower(config),
|
FfiConverterTypeRemoteSettingsConfig2.lower(config),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
readPointerSearchEngineSelector() {
|
readPointerSearchEngineSelector() {
|
||||||
const pointerId = 4; // search:SearchEngineSelector
|
const pointerId = 5; // search:SearchEngineSelector
|
||||||
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
return res;
|
return res;
|
||||||
@@ -182,7 +182,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
writePointerSearchEngineSelector(value) {
|
writePointerSearchEngineSelector(value) {
|
||||||
const pointerId = 4; // search:SearchEngineSelector
|
const pointerId = 5; // search:SearchEngineSelector
|
||||||
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
}
|
}
|
||||||
@@ -396,7 +396,7 @@ export class SearchEngineSelector {
|
|||||||
const liftError = null;
|
const liftError = null;
|
||||||
const functionCall = () => {
|
const functionCall = () => {
|
||||||
return UniFFIScaffolding.callSync(
|
return UniFFIScaffolding.callSync(
|
||||||
32, // search:uniffi_search_fn_constructor_searchengineselector_new
|
36, // search:uniffi_search_fn_constructor_searchengineselector_new
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return handleRustResult(functionCall(), liftResult, liftError);}
|
return handleRustResult(functionCall(), liftResult, liftError);}
|
||||||
@@ -411,7 +411,7 @@ export class SearchEngineSelector {
|
|||||||
const liftError = null;
|
const liftError = null;
|
||||||
const functionCall = () => {
|
const functionCall = () => {
|
||||||
return UniFFIScaffolding.callSync(
|
return UniFFIScaffolding.callSync(
|
||||||
27, // search:uniffi_search_fn_method_searchengineselector_clear_search_config
|
31, // search:uniffi_search_fn_method_searchengineselector_clear_search_config
|
||||||
FfiConverterTypeSearchEngineSelector.lower(this),
|
FfiConverterTypeSearchEngineSelector.lower(this),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -437,7 +437,7 @@ export class SearchEngineSelector {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callSync(
|
return UniFFIScaffolding.callSync(
|
||||||
28, // search:uniffi_search_fn_method_searchengineselector_filter_engine_configuration
|
32, // search:uniffi_search_fn_method_searchengineselector_filter_engine_configuration
|
||||||
FfiConverterTypeSearchEngineSelector.lower(this),
|
FfiConverterTypeSearchEngineSelector.lower(this),
|
||||||
FfiConverterTypeSearchUserEnvironment.lower(userEnvironment),
|
FfiConverterTypeSearchUserEnvironment.lower(userEnvironment),
|
||||||
)
|
)
|
||||||
@@ -461,7 +461,7 @@ export class SearchEngineSelector {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callSync(
|
return UniFFIScaffolding.callSync(
|
||||||
29, // search:uniffi_search_fn_method_searchengineselector_set_config_overrides
|
33, // search:uniffi_search_fn_method_searchengineselector_set_config_overrides
|
||||||
FfiConverterTypeSearchEngineSelector.lower(this),
|
FfiConverterTypeSearchEngineSelector.lower(this),
|
||||||
FfiConverterString.lower(overrides),
|
FfiConverterString.lower(overrides),
|
||||||
)
|
)
|
||||||
@@ -489,7 +489,7 @@ export class SearchEngineSelector {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callSync(
|
return UniFFIScaffolding.callSync(
|
||||||
30, // search:uniffi_search_fn_method_searchengineselector_set_search_config
|
34, // search:uniffi_search_fn_method_searchengineselector_set_search_config
|
||||||
FfiConverterTypeSearchEngineSelector.lower(this),
|
FfiConverterTypeSearchEngineSelector.lower(this),
|
||||||
FfiConverterString.lower(configuration),
|
FfiConverterString.lower(configuration),
|
||||||
)
|
)
|
||||||
@@ -530,7 +530,7 @@ export class SearchEngineSelector {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
31, // search:uniffi_search_fn_method_searchengineselector_use_remote_settings_server
|
35, // search:uniffi_search_fn_method_searchengineselector_use_remote_settings_server
|
||||||
FfiConverterTypeSearchEngineSelector.lower(this),
|
FfiConverterTypeSearchEngineSelector.lower(this),
|
||||||
FfiConverterTypeRemoteSettingsService.lower(service),
|
FfiConverterTypeRemoteSettingsService.lower(service),
|
||||||
FfiConverterBool.lower(applyEngineOverrides),
|
FfiConverterBool.lower(applyEngineOverrides),
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
readPointerSuggestStore() {
|
readPointerSuggestStore() {
|
||||||
const pointerId = 5; // suggest:SuggestStore
|
const pointerId = 6; // suggest:SuggestStore
|
||||||
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
return res;
|
return res;
|
||||||
@@ -182,7 +182,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
writePointerSuggestStore(value) {
|
writePointerSuggestStore(value) {
|
||||||
const pointerId = 5; // suggest:SuggestStore
|
const pointerId = 6; // suggest:SuggestStore
|
||||||
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
}
|
}
|
||||||
@@ -192,7 +192,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
readPointerSuggestStoreBuilder() {
|
readPointerSuggestStoreBuilder() {
|
||||||
const pointerId = 6; // suggest:SuggestStoreBuilder
|
const pointerId = 7; // suggest:SuggestStoreBuilder
|
||||||
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
return res;
|
return res;
|
||||||
@@ -202,7 +202,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
writePointerSuggestStoreBuilder(value) {
|
writePointerSuggestStoreBuilder(value) {
|
||||||
const pointerId = 6; // suggest:SuggestStoreBuilder
|
const pointerId = 7; // suggest:SuggestStoreBuilder
|
||||||
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
}
|
}
|
||||||
@@ -551,7 +551,7 @@ export class SuggestStore {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callSync(
|
return UniFFIScaffolding.callSync(
|
||||||
49, // suggest:uniffi_suggest_fn_constructor_suggeststore_new
|
53, // suggest:uniffi_suggest_fn_constructor_suggeststore_new
|
||||||
FfiConverterString.lower(path),
|
FfiConverterString.lower(path),
|
||||||
FfiConverterTypeRemoteSettingsService.lower(remoteSettingsService),
|
FfiConverterTypeRemoteSettingsService.lower(remoteSettingsService),
|
||||||
)
|
)
|
||||||
@@ -567,7 +567,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_any_dismissed_suggestions
|
38, // suggest:uniffi_suggest_fn_method_suggeststore_any_dismissed_suggestions
|
||||||
FfiConverterTypeSuggestStore.lower(this),
|
FfiConverterTypeSuggestStore.lower(this),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -586,7 +586,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(
|
||||||
35, // suggest:uniffi_suggest_fn_method_suggeststore_clear
|
39, // suggest:uniffi_suggest_fn_method_suggeststore_clear
|
||||||
FfiConverterTypeSuggestStore.lower(this),
|
FfiConverterTypeSuggestStore.lower(this),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -605,7 +605,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(
|
||||||
36, // suggest:uniffi_suggest_fn_method_suggeststore_clear_dismissed_suggestions
|
40, // suggest:uniffi_suggest_fn_method_suggeststore_clear_dismissed_suggestions
|
||||||
FfiConverterTypeSuggestStore.lower(this),
|
FfiConverterTypeSuggestStore.lower(this),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -638,7 +638,7 @@ export class SuggestStore {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
37, // suggest:uniffi_suggest_fn_method_suggeststore_dismiss_by_key
|
41, // suggest:uniffi_suggest_fn_method_suggeststore_dismiss_by_key
|
||||||
FfiConverterTypeSuggestStore.lower(this),
|
FfiConverterTypeSuggestStore.lower(this),
|
||||||
FfiConverterString.lower(key),
|
FfiConverterString.lower(key),
|
||||||
)
|
)
|
||||||
@@ -668,7 +668,7 @@ export class SuggestStore {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
38, // suggest:uniffi_suggest_fn_method_suggeststore_dismiss_by_suggestion
|
42, // suggest:uniffi_suggest_fn_method_suggeststore_dismiss_by_suggestion
|
||||||
FfiConverterTypeSuggestStore.lower(this),
|
FfiConverterTypeSuggestStore.lower(this),
|
||||||
FfiConverterTypeSuggestion.lower(suggestion),
|
FfiConverterTypeSuggestion.lower(suggestion),
|
||||||
)
|
)
|
||||||
@@ -701,7 +701,7 @@ export class SuggestStore {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
39, // suggest:uniffi_suggest_fn_method_suggeststore_dismiss_suggestion
|
43, // suggest:uniffi_suggest_fn_method_suggeststore_dismiss_suggestion
|
||||||
FfiConverterTypeSuggestStore.lower(this),
|
FfiConverterTypeSuggestStore.lower(this),
|
||||||
FfiConverterString.lower(suggestionUrl),
|
FfiConverterString.lower(suggestionUrl),
|
||||||
)
|
)
|
||||||
@@ -776,7 +776,7 @@ export class SuggestStore {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
40, // suggest:uniffi_suggest_fn_method_suggeststore_fetch_geonames
|
44, // 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),
|
||||||
@@ -800,7 +800,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(
|
||||||
41, // suggest:uniffi_suggest_fn_method_suggeststore_fetch_global_config
|
45, // suggest:uniffi_suggest_fn_method_suggeststore_fetch_global_config
|
||||||
FfiConverterTypeSuggestStore.lower(this),
|
FfiConverterTypeSuggestStore.lower(this),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -828,7 +828,7 @@ export class SuggestStore {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
42, // suggest:uniffi_suggest_fn_method_suggeststore_fetch_provider_config
|
46, // suggest:uniffi_suggest_fn_method_suggeststore_fetch_provider_config
|
||||||
FfiConverterTypeSuggestStore.lower(this),
|
FfiConverterTypeSuggestStore.lower(this),
|
||||||
FfiConverterTypeSuggestionProvider.lower(provider),
|
FfiConverterTypeSuggestionProvider.lower(provider),
|
||||||
)
|
)
|
||||||
@@ -857,7 +857,7 @@ export class SuggestStore {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
43, // suggest:uniffi_suggest_fn_method_suggeststore_ingest
|
47, // suggest:uniffi_suggest_fn_method_suggeststore_ingest
|
||||||
FfiConverterTypeSuggestStore.lower(this),
|
FfiConverterTypeSuggestStore.lower(this),
|
||||||
FfiConverterTypeSuggestIngestionConstraints.lower(constraints),
|
FfiConverterTypeSuggestIngestionConstraints.lower(constraints),
|
||||||
)
|
)
|
||||||
@@ -889,7 +889,7 @@ export class SuggestStore {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callSync(
|
return UniFFIScaffolding.callSync(
|
||||||
44, // suggest:uniffi_suggest_fn_method_suggeststore_interrupt
|
48, // suggest:uniffi_suggest_fn_method_suggeststore_interrupt
|
||||||
FfiConverterTypeSuggestStore.lower(this),
|
FfiConverterTypeSuggestStore.lower(this),
|
||||||
FfiConverterOptionalTypeInterruptKind.lower(kind),
|
FfiConverterOptionalTypeInterruptKind.lower(kind),
|
||||||
)
|
)
|
||||||
@@ -919,7 +919,7 @@ export class SuggestStore {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
45, // suggest:uniffi_suggest_fn_method_suggeststore_is_dismissed_by_key
|
49, // suggest:uniffi_suggest_fn_method_suggeststore_is_dismissed_by_key
|
||||||
FfiConverterTypeSuggestStore.lower(this),
|
FfiConverterTypeSuggestStore.lower(this),
|
||||||
FfiConverterString.lower(key),
|
FfiConverterString.lower(key),
|
||||||
)
|
)
|
||||||
@@ -952,7 +952,7 @@ export class SuggestStore {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
46, // suggest:uniffi_suggest_fn_method_suggeststore_is_dismissed_by_suggestion
|
50, // suggest:uniffi_suggest_fn_method_suggeststore_is_dismissed_by_suggestion
|
||||||
FfiConverterTypeSuggestStore.lower(this),
|
FfiConverterTypeSuggestStore.lower(this),
|
||||||
FfiConverterTypeSuggestion.lower(suggestion),
|
FfiConverterTypeSuggestion.lower(suggestion),
|
||||||
)
|
)
|
||||||
@@ -981,7 +981,7 @@ export class SuggestStore {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
47, // suggest:uniffi_suggest_fn_method_suggeststore_query
|
51, // suggest:uniffi_suggest_fn_method_suggeststore_query
|
||||||
FfiConverterTypeSuggestStore.lower(this),
|
FfiConverterTypeSuggestStore.lower(this),
|
||||||
FfiConverterTypeSuggestionQuery.lower(query),
|
FfiConverterTypeSuggestionQuery.lower(query),
|
||||||
)
|
)
|
||||||
@@ -1010,7 +1010,7 @@ export class SuggestStore {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
48, // suggest:uniffi_suggest_fn_method_suggeststore_query_with_metrics
|
52, // suggest:uniffi_suggest_fn_method_suggeststore_query_with_metrics
|
||||||
FfiConverterTypeSuggestStore.lower(this),
|
FfiConverterTypeSuggestStore.lower(this),
|
||||||
FfiConverterTypeSuggestionQuery.lower(query),
|
FfiConverterTypeSuggestionQuery.lower(query),
|
||||||
)
|
)
|
||||||
@@ -1081,7 +1081,7 @@ export class SuggestStoreBuilder {
|
|||||||
const liftError = null;
|
const liftError = null;
|
||||||
const functionCall = () => {
|
const functionCall = () => {
|
||||||
return UniFFIScaffolding.callSync(
|
return UniFFIScaffolding.callSync(
|
||||||
57, // suggest:uniffi_suggest_fn_constructor_suggeststorebuilder_new
|
61, // suggest:uniffi_suggest_fn_constructor_suggeststorebuilder_new
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return handleRustResult(functionCall(), liftResult, liftError);}
|
return handleRustResult(functionCall(), liftResult, liftError);}
|
||||||
@@ -1095,7 +1095,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(
|
||||||
50, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_build
|
54, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_build
|
||||||
FfiConverterTypeSuggestStoreBuilder.lower(this),
|
FfiConverterTypeSuggestStoreBuilder.lower(this),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -1119,7 +1119,7 @@ export class SuggestStoreBuilder {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
51, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_cache_path
|
55, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_cache_path
|
||||||
FfiConverterTypeSuggestStoreBuilder.lower(this),
|
FfiConverterTypeSuggestStoreBuilder.lower(this),
|
||||||
FfiConverterString.lower(path),
|
FfiConverterString.lower(path),
|
||||||
)
|
)
|
||||||
@@ -1148,7 +1148,7 @@ export class SuggestStoreBuilder {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callSync(
|
return UniFFIScaffolding.callSync(
|
||||||
52, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_data_path
|
56, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_data_path
|
||||||
FfiConverterTypeSuggestStoreBuilder.lower(this),
|
FfiConverterTypeSuggestStoreBuilder.lower(this),
|
||||||
FfiConverterString.lower(path),
|
FfiConverterString.lower(path),
|
||||||
)
|
)
|
||||||
@@ -1185,7 +1185,7 @@ export class SuggestStoreBuilder {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callSync(
|
return UniFFIScaffolding.callSync(
|
||||||
53, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_load_extension
|
57, // 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),
|
||||||
@@ -1211,7 +1211,7 @@ export class SuggestStoreBuilder {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callSync(
|
return UniFFIScaffolding.callSync(
|
||||||
54, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_bucket_name
|
58, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_bucket_name
|
||||||
FfiConverterTypeSuggestStoreBuilder.lower(this),
|
FfiConverterTypeSuggestStoreBuilder.lower(this),
|
||||||
FfiConverterString.lower(bucketName),
|
FfiConverterString.lower(bucketName),
|
||||||
)
|
)
|
||||||
@@ -1236,7 +1236,7 @@ export class SuggestStoreBuilder {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callSync(
|
return UniFFIScaffolding.callSync(
|
||||||
55, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_server
|
59, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_server
|
||||||
FfiConverterTypeSuggestStoreBuilder.lower(this),
|
FfiConverterTypeSuggestStoreBuilder.lower(this),
|
||||||
FfiConverterTypeRemoteSettingsServer.lower(server),
|
FfiConverterTypeRemoteSettingsServer.lower(server),
|
||||||
)
|
)
|
||||||
@@ -1261,7 +1261,7 @@ export class SuggestStoreBuilder {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callSync(
|
return UniFFIScaffolding.callSync(
|
||||||
56, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_service
|
60, // suggest:uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_service
|
||||||
FfiConverterTypeSuggestStoreBuilder.lower(this),
|
FfiConverterTypeSuggestStoreBuilder.lower(this),
|
||||||
FfiConverterTypeRemoteSettingsService.lower(rsService),
|
FfiConverterTypeRemoteSettingsService.lower(rsService),
|
||||||
)
|
)
|
||||||
@@ -4389,7 +4389,7 @@ export function rawSuggestionUrlMatches(rawUrl,cookedUrl) {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callSync(
|
return UniFFIScaffolding.callSync(
|
||||||
33, // suggest:uniffi_suggest_fn_func_raw_suggestion_url_matches
|
37, // suggest:uniffi_suggest_fn_func_raw_suggestion_url_matches
|
||||||
FfiConverterString.lower(rawUrl),
|
FfiConverterString.lower(rawUrl),
|
||||||
FfiConverterString.lower(cookedUrl),
|
FfiConverterString.lower(cookedUrl),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
readPointerRemoteCommandStore() {
|
readPointerRemoteCommandStore() {
|
||||||
const pointerId = 7; // tabs:RemoteCommandStore
|
const pointerId = 8; // tabs:RemoteCommandStore
|
||||||
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
return res;
|
return res;
|
||||||
@@ -182,7 +182,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
writePointerRemoteCommandStore(value) {
|
writePointerRemoteCommandStore(value) {
|
||||||
const pointerId = 7; // tabs:RemoteCommandStore
|
const pointerId = 8; // tabs:RemoteCommandStore
|
||||||
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
}
|
}
|
||||||
@@ -192,7 +192,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
readPointerTabsBridgedEngine() {
|
readPointerTabsBridgedEngine() {
|
||||||
const pointerId = 8; // tabs:TabsBridgedEngine
|
const pointerId = 9; // tabs:TabsBridgedEngine
|
||||||
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
return res;
|
return res;
|
||||||
@@ -202,7 +202,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
writePointerTabsBridgedEngine(value) {
|
writePointerTabsBridgedEngine(value) {
|
||||||
const pointerId = 8; // tabs:TabsBridgedEngine
|
const pointerId = 9; // tabs:TabsBridgedEngine
|
||||||
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
}
|
}
|
||||||
@@ -212,7 +212,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
readPointerTabsStore() {
|
readPointerTabsStore() {
|
||||||
const pointerId = 9; // tabs:TabsStore
|
const pointerId = 10; // tabs:TabsStore
|
||||||
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
return res;
|
return res;
|
||||||
@@ -222,7 +222,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
writePointerTabsStore(value) {
|
writePointerTabsStore(value) {
|
||||||
const pointerId = 9; // tabs:TabsStore
|
const pointerId = 10; // tabs:TabsStore
|
||||||
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
}
|
}
|
||||||
@@ -448,7 +448,7 @@ export class RemoteCommandStore {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
58, // tabs:uniffi_tabs_fn_method_remotecommandstore_add_remote_command
|
62, // 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(
|
||||||
59, // tabs:uniffi_tabs_fn_method_remotecommandstore_add_remote_command_at
|
63, // 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(
|
||||||
60, // tabs:uniffi_tabs_fn_method_remotecommandstore_get_unsent_commands
|
64, // 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(
|
||||||
61, // tabs:uniffi_tabs_fn_method_remotecommandstore_remove_remote_command
|
65, // 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(
|
||||||
62, // tabs:uniffi_tabs_fn_method_remotecommandstore_set_pending_command_sent
|
66, // 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(
|
||||||
63, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_apply
|
67, // 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(
|
||||||
64, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_ensure_current_sync_id
|
68, // 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(
|
||||||
65, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_last_sync
|
69, // 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(
|
||||||
66, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_prepare_for_sync
|
70, // 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(
|
||||||
67, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_reset
|
71, // 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(
|
||||||
68, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_reset_sync_id
|
72, // 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(
|
||||||
69, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_set_last_sync
|
73, // 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(
|
||||||
70, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_set_uploaded
|
74, // 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(
|
||||||
71, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_store_incoming
|
75, // 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(
|
||||||
72, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_finished
|
76, // 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(
|
||||||
73, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_id
|
77, // 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(
|
||||||
74, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_sync_started
|
78, // 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(
|
||||||
75, // tabs:uniffi_tabs_fn_method_tabsbridgedengine_wipe
|
79, // 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(
|
||||||
82, // tabs:uniffi_tabs_fn_constructor_tabsstore_new
|
86, // 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(
|
||||||
76, // tabs:uniffi_tabs_fn_method_tabsstore_bridged_engine
|
80, // 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(
|
||||||
77, // tabs:uniffi_tabs_fn_method_tabsstore_close_connection
|
81, // 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(
|
||||||
78, // tabs:uniffi_tabs_fn_method_tabsstore_get_all
|
82, // 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(
|
||||||
79, // tabs:uniffi_tabs_fn_method_tabsstore_new_remote_command_store
|
83, // 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(
|
||||||
80, // tabs:uniffi_tabs_fn_method_tabsstore_register_with_sync_manager
|
84, // 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(
|
||||||
81, // tabs:uniffi_tabs_fn_method_tabsstore_set_local_tabs
|
85, // tabs:uniffi_tabs_fn_method_tabsstore_set_local_tabs
|
||||||
FfiConverterTypeTabsStore.lower(this),
|
FfiConverterTypeTabsStore.lower(this),
|
||||||
FfiConverterSequenceTypeRemoteTabRecord.lower(remoteTabs),
|
FfiConverterSequenceTypeRemoteTabRecord.lower(remoteTabs),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
readPointerWebExtStorageBridgedEngine() {
|
readPointerWebExtStorageBridgedEngine() {
|
||||||
const pointerId = 10; // webextstorage:WebExtStorageBridgedEngine
|
const pointerId = 11; // webextstorage:WebExtStorageBridgedEngine
|
||||||
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
return res;
|
return res;
|
||||||
@@ -182,7 +182,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
writePointerWebExtStorageBridgedEngine(value) {
|
writePointerWebExtStorageBridgedEngine(value) {
|
||||||
const pointerId = 10; // webextstorage:WebExtStorageBridgedEngine
|
const pointerId = 11; // webextstorage:WebExtStorageBridgedEngine
|
||||||
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
}
|
}
|
||||||
@@ -192,7 +192,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
readPointerWebExtStorageStore() {
|
readPointerWebExtStorageStore() {
|
||||||
const pointerId = 11; // webextstorage:WebExtStorageStore
|
const pointerId = 12; // webextstorage:WebExtStorageStore
|
||||||
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
return res;
|
return res;
|
||||||
@@ -202,7 +202,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
writePointerWebExtStorageStore(value) {
|
writePointerWebExtStorageStore(value) {
|
||||||
const pointerId = 11; // webextstorage:WebExtStorageStore
|
const pointerId = 12; // webextstorage:WebExtStorageStore
|
||||||
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
}
|
}
|
||||||
@@ -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(
|
||||||
83, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_apply
|
87, // 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(
|
||||||
84, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_ensure_current_sync_id
|
88, // 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(
|
||||||
85, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_last_sync
|
89, // 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(
|
||||||
86, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_prepare_for_sync
|
90, // 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(
|
||||||
87, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_reset
|
91, // 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(
|
||||||
88, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_reset_sync_id
|
92, // 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(
|
||||||
89, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_set_last_sync
|
93, // 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(
|
||||||
90, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_set_uploaded
|
94, // 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(
|
||||||
91, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_store_incoming
|
95, // 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(
|
||||||
92, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_sync_finished
|
96, // 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(
|
||||||
93, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_sync_id
|
97, // 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(
|
||||||
94, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_sync_started
|
98, // 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(
|
||||||
95, // webextstorage:uniffi_webext_storage_fn_method_webextstoragebridgedengine_wipe
|
99, // 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(
|
||||||
104, // webextstorage:uniffi_webext_storage_fn_constructor_webextstoragestore_new
|
108, // 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(
|
||||||
96, // webextstorage:uniffi_webext_storage_fn_method_webextstoragestore_bridged_engine
|
100, // 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(
|
||||||
97, // webextstorage:uniffi_webext_storage_fn_method_webextstoragestore_clear
|
101, // 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(
|
||||||
98, // webextstorage:uniffi_webext_storage_fn_method_webextstoragestore_close
|
102, // 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(
|
||||||
99, // webextstorage:uniffi_webext_storage_fn_method_webextstoragestore_get
|
103, // 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(
|
||||||
100, // webextstorage:uniffi_webext_storage_fn_method_webextstoragestore_get_bytes_in_use
|
104, // 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(
|
||||||
101, // webextstorage:uniffi_webext_storage_fn_method_webextstoragestore_get_synced_changes
|
105, // 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(
|
||||||
102, // webextstorage:uniffi_webext_storage_fn_method_webextstoragestore_remove
|
106, // 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(
|
||||||
103, // webextstorage:uniffi_webext_storage_fn_method_webextstoragestore_set
|
107, // 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),
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ mod reexport_appservices_uniffi_scaffolding {
|
|||||||
suggest::uniffi_reexport_scaffolding!();
|
suggest::uniffi_reexport_scaffolding!();
|
||||||
webext_storage::uniffi_reexport_scaffolding!();
|
webext_storage::uniffi_reexport_scaffolding!();
|
||||||
search::uniffi_reexport_scaffolding!();
|
search::uniffi_reexport_scaffolding!();
|
||||||
|
context_id::uniffi_reexport_scaffolding!();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define extern "C" versions of these UniFFI functions, so that they can be called from C++
|
// Define extern "C" versions of these UniFFI functions, so that they can be called from C++
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
EXTRA_JS_MODULES += [
|
EXTRA_JS_MODULES += [
|
||||||
|
"generated/RustContextId.sys.mjs",
|
||||||
"generated/RustRelevancy.sys.mjs",
|
"generated/RustRelevancy.sys.mjs",
|
||||||
"generated/RustRemoteSettings.sys.mjs",
|
"generated/RustRemoteSettings.sys.mjs",
|
||||||
"generated/RustSearch.sys.mjs",
|
"generated/RustSearch.sys.mjs",
|
||||||
|
|||||||
@@ -9,6 +9,12 @@
|
|||||||
|
|
||||||
# TODO: Upgrade the TOML crate and switch to array of tables syntax.
|
# TODO: Upgrade the TOML crate and switch to array of tables syntax.
|
||||||
|
|
||||||
|
[context_id.async_wrappers]
|
||||||
|
enable = true
|
||||||
|
main_thread = [
|
||||||
|
"ContextIDComponent.new",
|
||||||
|
]
|
||||||
|
|
||||||
[search.async_wrappers]
|
[search.async_wrappers]
|
||||||
# All functions/methods are wrapped to be async by default and must be `await`ed.
|
# All functions/methods are wrapped to be async by default and must be `await`ed.
|
||||||
enable = true
|
enable = true
|
||||||
|
|||||||
@@ -431,7 +431,7 @@ export function add(a,b) {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
105, // arithmetic:uniffi_arithmetical_fn_func_add
|
109, // 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(
|
||||||
106, // arithmetic:uniffi_arithmetical_fn_func_div
|
110, // 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(
|
||||||
107, // arithmetic:uniffi_arithmetical_fn_func_equal
|
111, // 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(
|
||||||
108, // arithmetic:uniffi_arithmetical_fn_func_sub
|
112, // arithmetic:uniffi_arithmetical_fn_func_sub
|
||||||
FfiConverterU64.lower(a),
|
FfiConverterU64.lower(a),
|
||||||
FfiConverterU64.lower(b),
|
FfiConverterU64.lower(b),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -857,7 +857,7 @@ export function echoExplicitValue(value) {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
109, // custom_types:uniffi_uniffi_custom_types_fn_func_echo_explicit_value
|
113, // custom_types:uniffi_uniffi_custom_types_fn_func_echo_explicit_value
|
||||||
FfiConverterTypeExplicitValuedEnum.lower(value),
|
FfiConverterTypeExplicitValuedEnum.lower(value),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -886,7 +886,7 @@ export function echoGappedValue(value) {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
110, // custom_types:uniffi_uniffi_custom_types_fn_func_echo_gapped_value
|
114, // custom_types:uniffi_uniffi_custom_types_fn_func_echo_gapped_value
|
||||||
FfiConverterTypeGappedEnum.lower(value),
|
FfiConverterTypeGappedEnum.lower(value),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -915,7 +915,7 @@ export function echoSequentialValue(value) {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
111, // custom_types:uniffi_uniffi_custom_types_fn_func_echo_sequential_value
|
115, // custom_types:uniffi_uniffi_custom_types_fn_func_echo_sequential_value
|
||||||
FfiConverterTypeSequentialEnum.lower(value),
|
FfiConverterTypeSequentialEnum.lower(value),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -944,7 +944,7 @@ export function getCustomTypesDemo(demo) {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
112, // custom_types:uniffi_uniffi_custom_types_fn_func_get_custom_types_demo
|
116, // custom_types:uniffi_uniffi_custom_types_fn_func_get_custom_types_demo
|
||||||
FfiConverterOptionalTypeCustomTypesDemo.lower(demo),
|
FfiConverterOptionalTypeCustomTypesDemo.lower(demo),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -973,7 +973,7 @@ export function getExplicitDiscriminant(value) {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
113, // custom_types:uniffi_uniffi_custom_types_fn_func_get_explicit_discriminant
|
117, // custom_types:uniffi_uniffi_custom_types_fn_func_get_explicit_discriminant
|
||||||
FfiConverterTypeExplicitValuedEnum.lower(value),
|
FfiConverterTypeExplicitValuedEnum.lower(value),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -994,7 +994,7 @@ export function getExplicitEnumValues() {
|
|||||||
const liftError = null;
|
const liftError = null;
|
||||||
const functionCall = () => {
|
const functionCall = () => {
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
114, // custom_types:uniffi_uniffi_custom_types_fn_func_get_explicit_enum_values
|
118, // custom_types:uniffi_uniffi_custom_types_fn_func_get_explicit_enum_values
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@@ -1022,7 +1022,7 @@ export function getGappedDiscriminant(value) {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
115, // custom_types:uniffi_uniffi_custom_types_fn_func_get_gapped_discriminant
|
119, // custom_types:uniffi_uniffi_custom_types_fn_func_get_gapped_discriminant
|
||||||
FfiConverterTypeGappedEnum.lower(value),
|
FfiConverterTypeGappedEnum.lower(value),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -1043,7 +1043,7 @@ export function getGappedEnumValues() {
|
|||||||
const liftError = null;
|
const liftError = null;
|
||||||
const functionCall = () => {
|
const functionCall = () => {
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
116, // custom_types:uniffi_uniffi_custom_types_fn_func_get_gapped_enum_values
|
120, // custom_types:uniffi_uniffi_custom_types_fn_func_get_gapped_enum_values
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@@ -1071,7 +1071,7 @@ export function getSequentialDiscriminant(value) {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
117, // custom_types:uniffi_uniffi_custom_types_fn_func_get_sequential_discriminant
|
121, // custom_types:uniffi_uniffi_custom_types_fn_func_get_sequential_discriminant
|
||||||
FfiConverterTypeSequentialEnum.lower(value),
|
FfiConverterTypeSequentialEnum.lower(value),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -431,7 +431,7 @@ export function gradient(value) {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
118, // external_types:uniffi_uniffi_fixture_external_types_fn_func_gradient
|
122, // external_types:uniffi_uniffi_fixture_external_types_fn_func_gradient
|
||||||
FfiConverterOptionalTypeLine.lower(value),
|
FfiConverterOptionalTypeLine.lower(value),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -468,7 +468,7 @@ export function intersection(ln1,ln2) {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
119, // external_types:uniffi_uniffi_fixture_external_types_fn_func_intersection
|
123, // external_types:uniffi_uniffi_fixture_external_types_fn_func_intersection
|
||||||
FfiConverterTypeLine.lower(ln1),
|
FfiConverterTypeLine.lower(ln1),
|
||||||
FfiConverterTypeLine.lower(ln2),
|
FfiConverterTypeLine.lower(ln2),
|
||||||
)
|
)
|
||||||
@@ -497,7 +497,7 @@ export function moveSpriteToOrigin(sprite) {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
120, // external_types:uniffi_uniffi_fixture_external_types_fn_func_move_sprite_to_origin
|
124, // external_types:uniffi_uniffi_fixture_external_types_fn_func_move_sprite_to_origin
|
||||||
FfiConverterTypeSprite.lower(sprite),
|
FfiConverterTypeSprite.lower(sprite),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -665,7 +665,7 @@ export class FfiConverterSequencei32 extends FfiConverterArrayBuffer {
|
|||||||
|
|
||||||
const callbackHandlerLogger = new UniFFICallbackHandler(
|
const callbackHandlerLogger = new UniFFICallbackHandler(
|
||||||
"fixture_callbacks:Logger",
|
"fixture_callbacks:Logger",
|
||||||
1,
|
2,
|
||||||
[
|
[
|
||||||
new UniFFICallbackMethodHandler(
|
new UniFFICallbackMethodHandler(
|
||||||
"log",
|
"log",
|
||||||
@@ -737,7 +737,7 @@ export function callLogRepeat(logger,message,count,exclude) {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
121, // fixture_callbacks:uniffi_uniffi_fixture_callbacks_fn_func_call_log_repeat
|
125, // 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(
|
||||||
122, // fixture_callbacks:uniffi_uniffi_fixture_callbacks_fn_func_log_even_numbers
|
126, // 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(
|
||||||
123, // fixture_callbacks:uniffi_uniffi_fixture_callbacks_fn_func_log_even_numbers_main_thread
|
127, // 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),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
readPointerFutureTester() {
|
readPointerFutureTester() {
|
||||||
const pointerId = 12; // futures:FutureTester
|
const pointerId = 13; // futures:FutureTester
|
||||||
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
return res;
|
return res;
|
||||||
@@ -182,7 +182,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
writePointerFutureTester(value) {
|
writePointerFutureTester(value) {
|
||||||
const pointerId = 12; // futures:FutureTester
|
const pointerId = 13; // futures:FutureTester
|
||||||
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
}
|
}
|
||||||
@@ -192,7 +192,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
readPointerRustTask() {
|
readPointerRustTask() {
|
||||||
const pointerId = 13; // futures:RustTask
|
const pointerId = 14; // futures:RustTask
|
||||||
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
return res;
|
return res;
|
||||||
@@ -202,7 +202,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
writePointerRustTask(value) {
|
writePointerRustTask(value) {
|
||||||
const pointerId = 13; // futures:RustTask
|
const pointerId = 14; // futures:RustTask
|
||||||
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
}
|
}
|
||||||
@@ -212,7 +212,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
readPointerTraveller() {
|
readPointerTraveller() {
|
||||||
const pointerId = 14; // futures:Traveller
|
const pointerId = 15; // futures:Traveller
|
||||||
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
return res;
|
return res;
|
||||||
@@ -222,7 +222,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
writePointerTraveller(value) {
|
writePointerTraveller(value) {
|
||||||
const pointerId = 14; // futures:Traveller
|
const pointerId = 15; // futures:Traveller
|
||||||
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
}
|
}
|
||||||
@@ -232,7 +232,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
readPointerWorkerQueue() {
|
readPointerWorkerQueue() {
|
||||||
const pointerId = 15; // futures:WorkerQueue
|
const pointerId = 16; // futures:WorkerQueue
|
||||||
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
return res;
|
return res;
|
||||||
@@ -242,7 +242,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
writePointerWorkerQueue(value) {
|
writePointerWorkerQueue(value) {
|
||||||
const pointerId = 15; // futures:WorkerQueue
|
const pointerId = 16; // futures:WorkerQueue
|
||||||
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
}
|
}
|
||||||
@@ -662,7 +662,7 @@ export class FutureTester {
|
|||||||
const liftError = null;
|
const liftError = null;
|
||||||
const functionCall = () => {
|
const functionCall = () => {
|
||||||
return UniFFIScaffolding.callSync(
|
return UniFFIScaffolding.callSync(
|
||||||
144, // futures:uniffi_uniffi_fixture_futures_fn_constructor_futuretester_init
|
148, // 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(
|
||||||
141, // futures:uniffi_uniffi_fixture_futures_fn_method_futuretester_complete_futures
|
145, // 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(
|
||||||
142, // futures:uniffi_uniffi_fixture_futures_fn_method_futuretester_make_future
|
146, // 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(
|
||||||
143, // futures:uniffi_uniffi_fixture_futures_fn_method_futuretester_wake_futures
|
147, // 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(
|
||||||
145, // futures:uniffi_uniffi_fixture_futures_fn_method_rusttask_run
|
149, // 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(
|
||||||
147, // futures:uniffi_uniffi_fixture_futures_fn_constructor_traveller_new
|
151, // 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(
|
||||||
146, // futures:uniffi_uniffi_fixture_futures_fn_method_traveller_name
|
150, // 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(
|
||||||
148, // futures:uniffi_uniffi_fixture_futures_fn_method_workerqueue_add_task
|
152, // 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(
|
||||||
124, // futures:uniffi_uniffi_fixture_futures_fn_func_expensive_computation
|
128, // 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(
|
||||||
125, // futures:uniffi_uniffi_fixture_futures_fn_func_initialize_gecko_global_worker_queue
|
129, // 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(
|
||||||
126, // futures:uniffi_uniffi_fixture_futures_fn_func_initialize_global_worker_queue
|
130, // 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(
|
||||||
127, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_f32
|
131, // 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(
|
||||||
128, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_f64
|
132, // 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(
|
||||||
129, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_i16
|
133, // 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(
|
||||||
130, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_i32
|
134, // 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(
|
||||||
131, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_i64
|
135, // 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(
|
||||||
132, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_i8
|
136, // 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(
|
||||||
133, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_map
|
137, // 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(
|
||||||
134, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_obj
|
138, // 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(
|
||||||
135, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_string
|
139, // 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(
|
||||||
136, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_u16
|
140, // 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(
|
||||||
137, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_u32
|
141, // 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(
|
||||||
138, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_u64
|
142, // 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(
|
||||||
139, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_u8
|
143, // 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(
|
||||||
140, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_vec
|
144, // futures:uniffi_uniffi_fixture_futures_fn_func_roundtrip_vec
|
||||||
FfiConverterSequenceu32.lower(v),
|
FfiConverterSequenceu32.lower(v),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -542,7 +542,7 @@ export function gradient(ln) {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
149, // geometry:uniffi_uniffi_geometry_fn_func_gradient
|
153, // 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(
|
||||||
150, // geometry:uniffi_uniffi_geometry_fn_func_intersection
|
154, // geometry:uniffi_uniffi_geometry_fn_func_intersection
|
||||||
FfiConverterTypeLine.lower(ln1),
|
FfiConverterTypeLine.lower(ln1),
|
||||||
FfiConverterTypeLine.lower(ln2),
|
FfiConverterTypeLine.lower(ln2),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
readPointerSingletonObject() {
|
readPointerSingletonObject() {
|
||||||
const pointerId = 16; // refcounts:SingletonObject
|
const pointerId = 17; // refcounts:SingletonObject
|
||||||
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
return res;
|
return res;
|
||||||
@@ -182,7 +182,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
writePointerSingletonObject(value) {
|
writePointerSingletonObject(value) {
|
||||||
const pointerId = 16; // refcounts:SingletonObject
|
const pointerId = 17; // refcounts:SingletonObject
|
||||||
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
}
|
}
|
||||||
@@ -371,7 +371,7 @@ export class SingletonObject {
|
|||||||
const liftError = null;
|
const liftError = null;
|
||||||
const functionCall = () => {
|
const functionCall = () => {
|
||||||
return UniFFIScaffolding.callSync(
|
return UniFFIScaffolding.callSync(
|
||||||
153, // refcounts:uniffi_uniffi_fixture_refcounts_fn_method_singletonobject_method
|
157, // 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(
|
||||||
151, // refcounts:uniffi_uniffi_fixture_refcounts_fn_func_get_js_refcount
|
155, // 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(
|
||||||
152, // refcounts:uniffi_uniffi_fixture_refcounts_fn_func_get_singleton
|
156, // refcounts:uniffi_uniffi_fixture_refcounts_fn_func_get_singleton
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return handleRustResult(functionCall(), liftResult, liftError);
|
return handleRustResult(functionCall(), liftResult, liftError);
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
readPointerOptionneur() {
|
readPointerOptionneur() {
|
||||||
const pointerId = 17; // rondpoint:Optionneur
|
const pointerId = 18; // rondpoint:Optionneur
|
||||||
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
return res;
|
return res;
|
||||||
@@ -182,7 +182,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
writePointerOptionneur(value) {
|
writePointerOptionneur(value) {
|
||||||
const pointerId = 17; // rondpoint:Optionneur
|
const pointerId = 18; // rondpoint:Optionneur
|
||||||
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
}
|
}
|
||||||
@@ -192,7 +192,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
readPointerRetourneur() {
|
readPointerRetourneur() {
|
||||||
const pointerId = 18; // rondpoint:Retourneur
|
const pointerId = 19; // rondpoint:Retourneur
|
||||||
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
return res;
|
return res;
|
||||||
@@ -202,7 +202,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
writePointerRetourneur(value) {
|
writePointerRetourneur(value) {
|
||||||
const pointerId = 18; // rondpoint:Retourneur
|
const pointerId = 19; // rondpoint:Retourneur
|
||||||
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
}
|
}
|
||||||
@@ -212,7 +212,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
readPointerStringifier() {
|
readPointerStringifier() {
|
||||||
const pointerId = 19; // rondpoint:Stringifier
|
const pointerId = 20; // rondpoint:Stringifier
|
||||||
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
return res;
|
return res;
|
||||||
@@ -222,7 +222,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
writePointerStringifier(value) {
|
writePointerStringifier(value) {
|
||||||
const pointerId = 19; // rondpoint:Stringifier
|
const pointerId = 20; // rondpoint:Stringifier
|
||||||
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
}
|
}
|
||||||
@@ -665,7 +665,7 @@ export class Optionneur {
|
|||||||
const liftError = null;
|
const liftError = null;
|
||||||
const functionCall = () => {
|
const functionCall = () => {
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
184, // rondpoint:uniffi_uniffi_rondpoint_fn_constructor_optionneur_new
|
188, // 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(
|
||||||
159, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_boolean
|
163, // 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(
|
||||||
160, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_enum
|
164, // 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(
|
||||||
161, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_f32
|
165, // 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(
|
||||||
162, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_f64
|
166, // 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(
|
||||||
163, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i16_dec
|
167, // 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(
|
||||||
164, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i16_hex
|
168, // 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(
|
||||||
165, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i32_dec
|
169, // 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(
|
||||||
166, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i32_hex
|
170, // 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(
|
||||||
167, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i64_dec
|
171, // 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(
|
||||||
168, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i64_hex
|
172, // 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(
|
||||||
169, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i8_dec
|
173, // 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(
|
||||||
170, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_i8_hex
|
174, // 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(
|
||||||
171, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_null
|
175, // 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(
|
||||||
172, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_sequence
|
176, // 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(
|
||||||
173, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_string
|
177, // 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(
|
||||||
174, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u16_dec
|
178, // 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(
|
||||||
175, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u16_hex
|
179, // 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(
|
||||||
176, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u32_dec
|
180, // 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(
|
||||||
177, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u32_hex
|
181, // 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(
|
||||||
178, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u32_oct
|
182, // 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(
|
||||||
179, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u64_dec
|
183, // 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(
|
||||||
180, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u64_hex
|
184, // 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(
|
||||||
181, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u8_dec
|
185, // 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(
|
||||||
182, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_u8_hex
|
186, // 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(
|
||||||
183, // rondpoint:uniffi_uniffi_rondpoint_fn_method_optionneur_sinon_zero
|
187, // 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(
|
||||||
200, // rondpoint:uniffi_uniffi_rondpoint_fn_constructor_retourneur_new
|
204, // 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(
|
||||||
185, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_boolean
|
189, // 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(
|
||||||
186, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_double
|
190, // 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(
|
||||||
187, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_float
|
191, // 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(
|
||||||
188, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i16
|
192, // 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(
|
||||||
189, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i32
|
193, // 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(
|
||||||
190, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i64
|
194, // 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(
|
||||||
191, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_i8
|
195, // 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(
|
||||||
192, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_nombres
|
196, // 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(
|
||||||
193, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_nombres_signes
|
197, // 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(
|
||||||
194, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_optionneur_dictionnaire
|
198, // 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(
|
||||||
195, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_string
|
199, // 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(
|
||||||
196, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u16
|
200, // 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(
|
||||||
197, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u32
|
201, // 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(
|
||||||
198, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u64
|
202, // 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(
|
||||||
199, // rondpoint:uniffi_uniffi_rondpoint_fn_method_retourneur_identique_u8
|
203, // 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(
|
||||||
213, // rondpoint:uniffi_uniffi_rondpoint_fn_constructor_stringifier_new
|
217, // 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(
|
||||||
201, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_boolean
|
205, // 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(
|
||||||
202, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_double
|
206, // 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(
|
||||||
203, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_float
|
207, // 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(
|
||||||
204, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i16
|
208, // 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(
|
||||||
205, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i32
|
209, // 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(
|
||||||
206, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i64
|
210, // 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(
|
||||||
207, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_i8
|
211, // 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(
|
||||||
208, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u16
|
212, // 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(
|
||||||
209, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u32
|
213, // 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(
|
||||||
210, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u64
|
214, // 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(
|
||||||
211, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_to_string_u8
|
215, // 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(
|
||||||
212, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_well_known_string
|
216, // rondpoint:uniffi_uniffi_rondpoint_fn_method_stringifier_well_known_string
|
||||||
FfiConverterTypeStringifier.lower(this),
|
FfiConverterTypeStringifier.lower(this),
|
||||||
FfiConverterString.lower(value),
|
FfiConverterString.lower(value),
|
||||||
)
|
)
|
||||||
@@ -3686,7 +3686,7 @@ export function copieCarte(c) {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
154, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_carte
|
158, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_carte
|
||||||
FfiConverterMapStringTypeEnumerationAvecDonnees.lower(c),
|
FfiConverterMapStringTypeEnumerationAvecDonnees.lower(c),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -3715,7 +3715,7 @@ export function copieDictionnaire(d) {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
155, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_dictionnaire
|
159, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_dictionnaire
|
||||||
FfiConverterTypeDictionnaire.lower(d),
|
FfiConverterTypeDictionnaire.lower(d),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -3744,7 +3744,7 @@ export function copieEnumeration(e) {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
156, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_enumeration
|
160, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_enumeration
|
||||||
FfiConverterTypeEnumeration.lower(e),
|
FfiConverterTypeEnumeration.lower(e),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -3773,7 +3773,7 @@ export function copieEnumerations(e) {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
157, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_enumerations
|
161, // rondpoint:uniffi_uniffi_rondpoint_fn_func_copie_enumerations
|
||||||
FfiConverterSequenceTypeEnumeration.lower(e),
|
FfiConverterSequenceTypeEnumeration.lower(e),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -3802,7 +3802,7 @@ export function switcheroo(b) {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
158, // rondpoint:uniffi_uniffi_rondpoint_fn_func_switcheroo
|
162, // rondpoint:uniffi_uniffi_rondpoint_fn_func_switcheroo
|
||||||
FfiConverterBool.lower(b),
|
FfiConverterBool.lower(b),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
readPointerSprite() {
|
readPointerSprite() {
|
||||||
const pointerId = 20; // sprites:Sprite
|
const pointerId = 21; // sprites:Sprite
|
||||||
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
return res;
|
return res;
|
||||||
@@ -182,7 +182,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
writePointerSprite(value) {
|
writePointerSprite(value) {
|
||||||
const pointerId = 20; // sprites:Sprite
|
const pointerId = 21; // sprites:Sprite
|
||||||
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
}
|
}
|
||||||
@@ -370,7 +370,7 @@ export class Sprite {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
218, // sprites:uniffi_uniffi_sprites_fn_constructor_sprite_new
|
222, // 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(
|
||||||
219, // sprites:uniffi_uniffi_sprites_fn_constructor_sprite_new_relative_to
|
223, // 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(
|
||||||
215, // sprites:uniffi_uniffi_sprites_fn_method_sprite_get_position
|
219, // 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(
|
||||||
216, // sprites:uniffi_uniffi_sprites_fn_method_sprite_move_by
|
220, // 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(
|
||||||
217, // sprites:uniffi_uniffi_sprites_fn_method_sprite_move_to
|
221, // 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(
|
||||||
214, // sprites:uniffi_uniffi_sprites_fn_func_translate
|
218, // sprites:uniffi_uniffi_sprites_fn_func_translate
|
||||||
FfiConverterTypePoint.lower(p),
|
FfiConverterTypePoint.lower(p),
|
||||||
FfiConverterTypeVector.lower(v),
|
FfiConverterTypeVector.lower(v),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
readPointerTodoList() {
|
readPointerTodoList() {
|
||||||
const pointerId = 21; // todolist:TodoList
|
const pointerId = 22; // todolist:TodoList
|
||||||
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
return res;
|
return res;
|
||||||
@@ -182,7 +182,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
writePointerTodoList(value) {
|
writePointerTodoList(value) {
|
||||||
const pointerId = 21; // todolist:TodoList
|
const pointerId = 22; // todolist:TodoList
|
||||||
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
}
|
}
|
||||||
@@ -343,7 +343,7 @@ export class TodoList {
|
|||||||
const liftError = null;
|
const liftError = null;
|
||||||
const functionCall = () => {
|
const functionCall = () => {
|
||||||
return UniFFIScaffolding.callAsyncWrapper(
|
return UniFFIScaffolding.callAsyncWrapper(
|
||||||
234, // todolist:uniffi_uniffi_todolist_fn_constructor_todolist_new
|
238, // 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(
|
||||||
223, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_entries
|
227, // 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(
|
||||||
224, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_entry
|
228, // 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(
|
||||||
225, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_item
|
229, // 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(
|
||||||
226, // todolist:uniffi_uniffi_todolist_fn_method_todolist_add_items
|
230, // 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(
|
||||||
227, // todolist:uniffi_uniffi_todolist_fn_method_todolist_clear_item
|
231, // 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(
|
||||||
228, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_entries
|
232, // 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(
|
||||||
229, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_first
|
233, // 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(
|
||||||
230, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_items
|
234, // 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(
|
||||||
231, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_last
|
235, // 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(
|
||||||
232, // todolist:uniffi_uniffi_todolist_fn_method_todolist_get_last_entry
|
236, // 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(
|
||||||
233, // todolist:uniffi_uniffi_todolist_fn_method_todolist_make_default
|
237, // 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(
|
||||||
220, // todolist:uniffi_uniffi_todolist_fn_func_create_entry_with
|
224, // 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(
|
||||||
221, // todolist:uniffi_uniffi_todolist_fn_func_get_default_list
|
225, // 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(
|
||||||
222, // todolist:uniffi_uniffi_todolist_fn_func_set_default_list
|
226, // todolist:uniffi_uniffi_todolist_fn_func_set_default_list
|
||||||
FfiConverterTypeTodoList.lower(list),
|
FfiConverterTypeTodoList.lower(list),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
readPointerCalc() {
|
readPointerCalc() {
|
||||||
const pointerId = 22; // uniffi_trait_interfaces:Calc
|
const pointerId = 23; // uniffi_trait_interfaces:Calc
|
||||||
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
const res = UniFFIScaffolding.readPointer(pointerId, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
return res;
|
return res;
|
||||||
@@ -182,7 +182,7 @@ class ArrayBufferDataStream {
|
|||||||
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
// UniFFI Pointers are **always** 8 bytes long. That is enforced
|
||||||
// by the C++ and Rust Scaffolding code.
|
// by the C++ and Rust Scaffolding code.
|
||||||
writePointerCalc(value) {
|
writePointerCalc(value) {
|
||||||
const pointerId = 22; // uniffi_trait_interfaces:Calc
|
const pointerId = 23; // uniffi_trait_interfaces:Calc
|
||||||
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
UniFFIScaffolding.writePointer(pointerId, value, this.dataView.buffer, this.pos);
|
||||||
this.pos += 8;
|
this.pos += 8;
|
||||||
}
|
}
|
||||||
@@ -388,7 +388,7 @@ export class Calc {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return UniFFIScaffolding.callSync(
|
return UniFFIScaffolding.callSync(
|
||||||
237, // uniffi_trait_interfaces:uniffi_uniffi_trait_interfaces_fn_method_calc_add
|
241, // 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(
|
||||||
235, // uniffi_trait_interfaces:uniffi_uniffi_trait_interfaces_fn_func_make_buggy_calculator
|
239, // 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(
|
||||||
236, // uniffi_trait_interfaces:uniffi_uniffi_trait_interfaces_fn_func_make_calculator
|
240, // uniffi_trait_interfaces:uniffi_uniffi_trait_interfaces_fn_func_make_calculator
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return handleRustResult(functionCall(), liftResult, liftError);
|
return handleRustResult(functionCall(), liftResult, liftError);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user