summaryrefslogtreecommitdiffstats
path: root/third_party/rust/tabs/src/lib.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /third_party/rust/tabs/src/lib.rs
parentInitial commit. (diff)
downloadfirefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz
firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/tabs/src/lib.rs')
-rw-r--r--third_party/rust/tabs/src/lib.rs39
1 files changed, 39 insertions, 0 deletions
diff --git a/third_party/rust/tabs/src/lib.rs b/third_party/rust/tabs/src/lib.rs
new file mode 100644
index 0000000000..fbaddc471f
--- /dev/null
+++ b/third_party/rust/tabs/src/lib.rs
@@ -0,0 +1,39 @@
+/* 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/. */
+
+#![allow(unknown_lints)]
+#![warn(rust_2018_idioms)]
+
+#[macro_use]
+pub mod error;
+mod schema;
+mod storage;
+mod store;
+mod sync;
+
+uniffi_macros::include_scaffolding!("tabs");
+
+// Our UDL uses a `Guid` type.
+use sync_guid::Guid as TabsGuid;
+impl UniffiCustomTypeConverter for TabsGuid {
+ type Builtin = String;
+
+ fn into_custom(val: Self::Builtin) -> uniffi::Result<TabsGuid> {
+ Ok(TabsGuid::new(val.as_str()))
+ }
+
+ fn from_custom(obj: Self) -> Self::Builtin {
+ obj.into()
+ }
+}
+
+pub use crate::storage::{ClientRemoteTabs, RemoteTabRecord, TabsDeviceType};
+pub use crate::store::TabsStore;
+pub use error::{ApiResult, Error, Result, TabsApiError};
+use sync15::DeviceType;
+
+pub use crate::sync::engine::get_registered_sync_engine;
+
+pub use crate::sync::bridge::TabsBridgedEngine;
+pub use crate::sync::engine::TabsEngine;