pub struct RemoteSettingsContext {Show 16 fields
pub app_name: String,
pub app_id: String,
pub channel: String,
pub app_version: Option<String>,
pub app_build: Option<String>,
pub architecture: Option<String>,
pub device_manufacturer: Option<String>,
pub device_model: Option<String>,
pub locale: Option<String>,
pub os: Option<String>,
pub os_version: Option<String>,
pub android_sdk_version: Option<String>,
pub debug_tag: Option<String>,
pub installation_date: Option<i64>,
pub home_directory: Option<String>,
pub custom_targeting_attributes: Option<Map<String, Value>>,
}
Expand description
The RemoteSettingsContext
object represents the parameters and characteristics of the
consuming application. For remote-settings
, it is used to filter locally stored records
.
We always fetch all records
from the remote-settings storage. Some records could have a filter_expression
attached to them, which will be matched against the RemoteSettingsContext
.
When set, only records where the expression is true will be returned.
Fields§
§app_name: String
Name of the application (e.g. “Fenix” or “Firefox iOS”)
app_id: String
Application identifier, especially for mobile (e.g. “org.mozilla.fenix”)
channel: String
The delivery channel of the application (e.g “nightly”)
app_version: Option<String>
User visible version string (e.g. “1.0.3”)
app_build: Option<String>
Build identifier generated by the CI system (e.g. “1234/A”)
architecture: Option<String>
The architecture of the device, (e.g. “arm”, “x86”)
device_manufacturer: Option<String>
The manufacturer of the device the application is running on
device_model: Option<String>
The model of the device the application is running on
locale: Option<String>
The locale of the application during initialization (e.g. “es-ES”)
os: Option<String>
The name of the operating system (e.g. “Android”, “iOS”, “Darwin”, “Windows”)
os_version: Option<String>
The user-visible version of the operating system (e.g. “1.2.3”)
android_sdk_version: Option<String>
Android specific for targeting specific sdk versions
debug_tag: Option<String>
Used for debug purposes as a way to match only developer builds, etc.
installation_date: Option<i64>
The date the application installed the app
home_directory: Option<String>
The application’s home directory
custom_targeting_attributes: Option<Map<String, Value>>
Contains attributes specific to the application, derived by the application
Trait Implementations§
source§impl Clone for RemoteSettingsContext
impl Clone for RemoteSettingsContext
source§fn clone(&self) -> RemoteSettingsContext
fn clone(&self) -> RemoteSettingsContext
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<UT> ConvertError<UT> for RemoteSettingsContext
impl<UT> ConvertError<UT> for RemoteSettingsContext
fn try_convert_unexpected_callback_error( e: UnexpectedUniFFICallbackError, ) -> Result<Self>
source§impl Debug for RemoteSettingsContext
impl Debug for RemoteSettingsContext
source§impl Default for RemoteSettingsContext
impl Default for RemoteSettingsContext
source§fn default() -> RemoteSettingsContext
fn default() -> RemoteSettingsContext
source§impl<'de> Deserialize<'de> for RemoteSettingsContext
impl<'de> Deserialize<'de> for RemoteSettingsContext
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl<UT> FfiConverter<UT> for RemoteSettingsContext
impl<UT> FfiConverter<UT> for RemoteSettingsContext
source§const TYPE_ID_META: MetadataBuffer = _
const TYPE_ID_META: MetadataBuffer = _
source§type FfiType = RustBuffer
type FfiType = RustBuffer
source§fn lower(v: Self) -> RustBuffer
fn lower(v: Self) -> RustBuffer
source§fn try_lift(buf: RustBuffer) -> Result<Self>
fn try_lift(buf: RustBuffer) -> Result<Self>
source§impl<UT> Lift<UT> for RemoteSettingsContext
impl<UT> Lift<UT> for RemoteSettingsContext
source§impl<UT> LiftRef<UT> for RemoteSettingsContext
impl<UT> LiftRef<UT> for RemoteSettingsContext
source§impl<UT> LiftReturn<UT> for RemoteSettingsContext
impl<UT> LiftReturn<UT> for RemoteSettingsContext
source§type ReturnType = <RemoteSettingsContext as Lift<UT>>::FfiType
type ReturnType = <RemoteSettingsContext as Lift<UT>>::FfiType
source§fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
§fn lift_foreign_return(
ffi_return: Self::ReturnType,
call_status: RustCallStatus,
) -> Self
fn lift_foreign_return( ffi_return: Self::ReturnType, call_status: RustCallStatus, ) -> Self
§fn lift_error(_buf: RustBuffer) -> Self
fn lift_error(_buf: RustBuffer) -> Self
§fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
source§impl<UT> Lower<UT> for RemoteSettingsContext
impl<UT> Lower<UT> for RemoteSettingsContext
source§impl<UT> LowerError<UT> for RemoteSettingsContext
impl<UT> LowerError<UT> for RemoteSettingsContext
source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
source§impl<UT> LowerReturn<UT> for RemoteSettingsContext
impl<UT> LowerReturn<UT> for RemoteSettingsContext
source§type ReturnType = <RemoteSettingsContext as Lower<UT>>::FfiType
type ReturnType = <RemoteSettingsContext as Lower<UT>>::FfiType
source§fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
source§impl Serialize for RemoteSettingsContext
impl Serialize for RemoteSettingsContext
source§impl<UT> TypeId<UT> for RemoteSettingsContext
impl<UT> TypeId<UT> for RemoteSettingsContext
const TYPE_ID_META: MetadataBuffer = _
Auto Trait Implementations§
impl Freeze for RemoteSettingsContext
impl RefUnwindSafe for RemoteSettingsContext
impl Send for RemoteSettingsContext
impl Sync for RemoteSettingsContext
impl Unpin for RemoteSettingsContext
impl UnwindSafe for RemoteSettingsContext
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
Read more