pub struct RemoteSettingsContext {
pub channel: Option<String>,
pub app_version: Option<String>,
pub app_id: Option<String>,
pub locale: Option<String>,
pub os: Option<String>,
pub os_version: Option<String>,
pub form_factor: Option<String>,
pub country: Option<String>,
pub custom_targetting_attributes: Option<HashMap<String, String>>,
}
Expand description
Remote settings context object
This is used to filter the records returned. We always fetch all records
from the
remote-settings storage. Some records could have a filter_expression
. If this is passed in
and the record has a filter_expression
, then only returns where the expression is true will
be returned.
See https://remote-settings.readthedocs.io/en/latest/target-filters.html for details.
Fields§
§channel: Option<String>
The delivery channel of the application (e.g “nightly”)
app_version: Option<String>
User visible version string (e.g. “1.0.3”)
app_id: Option<String>
String containing the XUL application app_id
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”, “WINNT”)
os_version: Option<String>
The user-visible version of the operating system (e.g. “1.2.3”)
form_factor: Option<String>
Form-factor of the device (“phone”, “tablet”, or “desktop”)
country: Option<String>
Country of the user.
This is usually populated in one of two ways:
- The second component of the locale
- By using a geolocation service, which determines country via the user’s IP.
Firefox apps usually have a module that integrates with these services,
for example
Region
on Desktop andRegionMiddleware
on Android.
custom_targetting_attributes: Option<HashMap<String, String>>
Extra attributes to add to the env for JEXL filtering.
Use this for prototyping / testing new features. In the long-term, new fields should be added to the official list and supported by both the Rust and Gecko clients.
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<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<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,
§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