1#![allow(unknown_lints)]
6#![warn(rust_2018_idioms)]
7
8mod api;
9mod db;
10pub mod error;
11mod ffi;
12mod migration;
13mod schema;
14pub mod store;
15mod sync;
16
17pub use migration::MigrationInfo;
18
19pub use sync::STORAGE_VERSION;
21
22pub use api::SYNC_MAX_ITEMS;
23pub use api::SYNC_QUOTA_BYTES;
24pub use api::SYNC_QUOTA_BYTES_PER_ITEM;
25
26pub use crate::error::{QuotaReason, WebExtStorageApiError};
27pub use crate::store::WebExtStorageStore;
28pub use crate::sync::{bridge::WebExtStorageBridgedEngine, SyncedExtensionChange};
29pub use api::UsageInfo;
30pub use api::{StorageChanges, StorageValueChange};
31
32uniffi::include_scaffolding!("webext-storage");
33
34use serde_json::Value as JsonValue;
35
36uniffi::custom_type!(JsonValue, String, {
37 remote,
38 try_lift: |val| Ok(serde_json::from_str(val.as_str()).unwrap()),
39 lower: |obj| obj.to_string(),
40});
41
42use sync_guid::Guid;
44uniffi::custom_type!(Guid, String, {
45 remote,
46 try_lift: |val| Ok(Guid::new(val.as_str())),
47 lower: |obj| obj.into()
48});