pub struct RemoteSettingsService { /* private fields */ }
Expand description
Application-level Remote Settings manager.
This handles application-level operations, like syncing all the collections, and acts as a factory for creating clients.
Implementations§
source§impl RemoteSettingsService
impl RemoteSettingsService
sourcepub fn new(
storage_dir: String,
config: RemoteSettingsConfig2,
) -> ApiResult<Self>
pub fn new( storage_dir: String, config: RemoteSettingsConfig2, ) -> ApiResult<Self>
Construct a RemoteSettingsService
This is typically done early in the application-startup process
sourcepub fn make_client(
&self,
collection_name: String,
app_context: Option<RemoteSettingsContext>,
) -> ApiResult<Arc<RemoteSettingsClient>>
pub fn make_client( &self, collection_name: String, app_context: Option<RemoteSettingsContext>, ) -> ApiResult<Arc<RemoteSettingsClient>>
Create a new Remote Settings client
sourcepub fn update_config(&self, config: RemoteSettingsConfig2) -> ApiResult<()>
pub fn update_config(&self, config: RemoteSettingsConfig2) -> ApiResult<()>
Update the remote settings config
This will cause all current and future clients to use new config and will delete any stored records causing the clients to return new results from the new config.
Only intended for QA/debugging. Swapping the remote settings server in the middle of execution can cause weird effects.
Trait Implementations§
source§impl<UT> LiftRef<UT> for RemoteSettingsService
impl<UT> LiftRef<UT> for RemoteSettingsService
type LiftType = Arc<RemoteSettingsService>
source§impl<UT> LowerError<UT> for RemoteSettingsService
impl<UT> LowerError<UT> for RemoteSettingsService
source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Lower this value for scaffolding function return Read more
source§impl<UT> LowerReturn<UT> for RemoteSettingsService
impl<UT> LowerReturn<UT> for RemoteSettingsService
source§type ReturnType = <Arc<RemoteSettingsService> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<RemoteSettingsService> as LowerReturn<UniFfiTag>>::ReturnType
The type that should be returned by scaffolding functions for this type. Read more
source§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
Lower the return value from an scaffolding call Read more
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Lower the return value for failed argument lifts Read more
source§impl<UT> TypeId<UT> for RemoteSettingsService
impl<UT> TypeId<UT> for RemoteSettingsService
const TYPE_ID_META: MetadataBuffer = _
Auto Trait Implementations§
impl !Freeze for RemoteSettingsService
impl !RefUnwindSafe for RemoteSettingsService
impl Send for RemoteSettingsService
impl Sync for RemoteSettingsService
impl Unpin for RemoteSettingsService
impl !UnwindSafe for RemoteSettingsService
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
Mutably borrows from an owned value. Read more
§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
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
Read more