Copy as Markdown
Other Tools
// This file was autogenerated by some hot garbage in the `uniffi` crate.
// Trust me, you don't want to mess with it!
::uniffi::setup_scaffolding!("webextstorage");
/// Export info about the UDL while used to create us
/// See `uniffi_bindgen::macro_metadata` for how this is used.
// ditto for info about the UDL which spawned us.
const UNIFFI_META_CONST_UDL_WEBEXTSTORAGE: ::uniffi::MetadataBuffer = ::uniffi::MetadataBuffer::from_code(::uniffi::metadata::codes::UDL_FILE)
.concat_str("webext_storage")
.concat_str("webextstorage")
.concat_str("webext-storage");
#[doc(hidden)]
#[no_mangle]
pub static UNIFFI_META_UDL_WEBEXTSTORAGE: [u8; UNIFFI_META_CONST_UDL_WEBEXTSTORAGE.size] = UNIFFI_META_CONST_UDL_WEBEXTSTORAGE.into_array();
// Enum definitions, corresponding to `enum` in UDL.
#[::uniffi::udl_derive(Enum)]
enum r#QuotaReason {
r#TotalBytes {
},
r#ItemBytes {
},
r#MaxItems {
},
}
// Error definitions, corresponding to `error` in the UDL.
#[::uniffi::udl_derive(Error)]
enum r#WebExtStorageApiError {
r#UnexpectedError {
r#reason: ::std::string::String,
},
r#JsonError {
r#reason: ::std::string::String,
},
r#QuotaError {
r#reason: r#QuotaReason,
},
}
// Record definitions, implemented as method-less structs, corresponding to `dictionary` objects.
#[::uniffi::udl_derive(Record)]
struct r#StorageChanges {
r#changes: std::vec::Vec<r#StorageValueChange>,
}
#[::uniffi::udl_derive(Record)]
struct r#StorageValueChange {
r#key: ::std::string::String,
r#old_value: ::std::option::Option<r#JsonValue>,
r#new_value: ::std::option::Option<r#JsonValue>,
}
// Top level functions, corresponding to UDL `namespace` functions.// Object definitions, corresponding to UDL `interface` definitions.
#[::uniffi::udl_derive(Object)]
struct r#WebExtStorageStore { }
#[::uniffi::export_for_udl]
impl r#WebExtStorageStore {
#[uniffi::constructor]
pub fn r#new(
r#path: ::std::string::String,
) -> ::std::result::Result::<::std::sync::Arc<r#WebExtStorageStore>, r#WebExtStorageApiError>
{
unreachable!()
}
}
#[::uniffi::export_for_udl]
impl r#WebExtStorageStore {
pub fn r#clear(
&self,
r#ext_id: &::std::string::String,
) -> ::std::result::Result::<r#StorageChanges, r#WebExtStorageApiError>
{
unreachable!()
}
}
#[::uniffi::export_for_udl]
impl r#WebExtStorageStore {
pub fn r#get(
&self,
r#ext_id: &::std::string::String,
r#keys: r#JsonValue,
) -> ::std::result::Result::<r#JsonValue, r#WebExtStorageApiError>
{
unreachable!()
}
}
#[::uniffi::export_for_udl]
impl r#WebExtStorageStore {
pub fn r#remove(
&self,
r#ext_id: &::std::string::String,
r#keys: r#JsonValue,
) -> ::std::result::Result::<r#StorageChanges, r#WebExtStorageApiError>
{
unreachable!()
}
}
#[::uniffi::export_for_udl]
impl r#WebExtStorageStore {
pub fn r#set(
&self,
r#ext_id: &::std::string::String,
r#val: r#JsonValue,
) -> ::std::result::Result::<r#StorageChanges, r#WebExtStorageApiError>
{
unreachable!()
}
}
// Callback Interface definitions, corresponding to UDL `callback interface` definitions.
// External and Wrapped types
// Support for external types.
// Types with an external `FfiConverter`...
// We generate support for each Custom Type and the builtin type it uses.
::uniffi::custom_type!(r#JsonValue, ::std::string::String);
// Export scaffolding checksums for UDL items
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_webext_storage_checksum_method_webextstoragestore_clear() -> u16 {
45209
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_webext_storage_checksum_method_webextstoragestore_get() -> u16 {
8150
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_webext_storage_checksum_method_webextstoragestore_remove() -> u16 {
15591
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_webext_storage_checksum_method_webextstoragestore_set() -> u16 {
15682
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_webext_storage_checksum_constructor_webextstoragestore_new() -> u16 {
15977
}