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!("remote_settings");
/// 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_REMOTE_SETTINGS: ::uniffi::MetadataBuffer = ::uniffi::MetadataBuffer::from_code(::uniffi::metadata::codes::UDL_FILE)
.concat_str("remote_settings")
.concat_str("remote_settings")
.concat_str("remote_settings");
#[doc(hidden)]
#[no_mangle]
pub static UNIFFI_META_UDL_REMOTE_SETTINGS: [u8; UNIFFI_META_CONST_UDL_REMOTE_SETTINGS.size] = UNIFFI_META_CONST_UDL_REMOTE_SETTINGS.into_array();
// Error definitions, corresponding to `error` in the UDL.
#[::uniffi::derive_error_for_udl(
flat_error,
)]
enum r#RemoteSettingsError {
r#JSONError {
},
r#FileError {
},
r#RequestError {
},
r#UrlParsingError {
},
r#BackoffError {
},
r#ResponseError {
},
r#AttachmentsUnsupportedError {
},
r#ConfigError {
},
}
// Enum definitions, corresponding to `enum` in UDL.
#[::uniffi::derive_enum_for_udl(
)]
enum r#RemoteSettingsServer {
r#Prod {
},
r#Stage {
},
r#Dev {
},
r#Custom {
r#url: String,
},
}
// Record definitions, implemented as method-less structs, corresponding to `dictionary` objects.
#[::uniffi::derive_record_for_udl]
struct r#Attachment {
r#filename: String,
r#mimetype: String,
r#location: String,
r#hash: String,
r#size: u64,
}
#[::uniffi::derive_record_for_udl]
struct r#RemoteSettingsConfig {
r#collection_name: String,
r#bucket_name: std::option::Option<String>,
r#server_url: std::option::Option<String>,
r#server: std::option::Option<r#RemoteSettingsServer>,
}
#[::uniffi::derive_record_for_udl]
struct r#RemoteSettingsRecord {
r#id: String,
r#last_modified: u64,
r#deleted: bool,
r#attachment: std::option::Option<r#Attachment>,
r#fields: r#RsJsonObject,
}
#[::uniffi::derive_record_for_udl]
struct r#RemoteSettingsResponse {
r#records: std::vec::Vec<r#RemoteSettingsRecord>,
r#last_modified: u64,
}
// Top level functions, corresponding to UDL `namespace` functions.// Object definitions, corresponding to UDL `interface` definitions.
#[::uniffi::derive_object_for_udl]
struct r#RemoteSettings { }
#[::uniffi::export_for_udl]
impl r#RemoteSettings {
#[uniffi::constructor]
pub fn r#new(
r#remote_settings_config: r#RemoteSettingsConfig,
) -> ::std::result::Result::<std::sync::Arc<r#RemoteSettings>, r#RemoteSettingsError>
{
unreachable!()
}
}
#[::uniffi::export_for_udl]
impl r#RemoteSettings {
pub fn r#download_attachment_to_path(
&self,
r#attachment_id: String,
r#path: String,
) -> ::std::result::Result::<(), r#RemoteSettingsError>
{
unreachable!()
}
}
#[::uniffi::export_for_udl]
impl r#RemoteSettings {
pub fn r#get_records(
&self,
) -> ::std::result::Result::<r#RemoteSettingsResponse, r#RemoteSettingsError>
{
unreachable!()
}
}
#[::uniffi::export_for_udl]
impl r#RemoteSettings {
pub fn r#get_records_since(
&self,
r#timestamp: u64,
) -> ::std::result::Result::<r#RemoteSettingsResponse, r#RemoteSettingsError>
{
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#RsJsonObject, String);
// Export scaffolding checksums for UDL items
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_remote_settings_checksum_method_remotesettings_download_attachment_to_path() -> u16 {
45318
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_remote_settings_checksum_method_remotesettings_get_records() -> u16 {
14513
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_remote_settings_checksum_method_remotesettings_get_records_since() -> u16 {
31407
}
#[no_mangle]
#[doc(hidden)]
pub extern "C" fn r#uniffi_remote_settings_checksum_constructor_remotesettings_new() -> u16 {
54895
}