pub struct Config { /* private fields */ }
Implementations§
source§impl Config
impl Config
sourcepub fn set_fiat_currency(&self, fiat_currency: String) -> Result<()>
pub fn set_fiat_currency(&self, fiat_currency: String) -> Result<()>
Set the fiat currency (ISO 4217 currency code) - not all are supported
The method Config::list_currencies
can used to list supported codes.
Requires network: no
sourcepub fn set_timezone_config(&self, timezone_config: TzConfig)
pub fn set_timezone_config(&self, timezone_config: TzConfig)
Set the timezone config.
Parameters:
timezone_config
- the user’s current timezone
Requires network: no
sourcepub fn set_analytics_config(&self, config: AnalyticsConfig) -> Result<()>
pub fn set_analytics_config(&self, config: AnalyticsConfig) -> Result<()>
Set the analytics configuration.
This can be used to completely prevent any analytics data from being reported.
Requires network: no
sourcepub fn get_analytics_config(&self) -> Result<AnalyticsConfig>
pub fn get_analytics_config(&self) -> Result<AnalyticsConfig>
Get the currently configured analytics configuration.
Requires network: no
sourcepub fn register_notification_token(
&self,
notification_token: String,
language_iso_639_1: String,
country_iso_3166_1_alpha_2: String,
) -> Result<()>
pub fn register_notification_token( &self, notification_token: String, language_iso_639_1: String, country_iso_3166_1_alpha_2: String, ) -> Result<()>
Registers a new notification token. If a token has already been registered, it will be updated.
Requires network: yes
sourcepub fn set_feature_flag(
&self,
feature: FeatureFlag,
flag_enabled: bool,
) -> Result<()>
pub fn set_feature_flag( &self, feature: FeatureFlag, flag_enabled: bool, ) -> Result<()>
Set value of a feature flag. The method will report the change to the backend and update the local database.
Parameters:
feature
- feature flag to be set.enable
- enable or disable the feature.
Requires network: yes
sourcepub fn list_currencies(&self) -> Vec<String>
pub fn list_currencies(&self) -> Vec<String>
List codes of supported fiat currencies. Please keep in mind that this method doesn’t make any network calls. It simply retrieves previously fetched values that are frequently updated by a background task.
The fetched list will be persisted across restarts to alleviate the consequences of a slow or unresponsive exchange rate service. The method will return an empty list if there is nothing persisted yet and the values are not yet fetched from the service.
Requires network: no
sourcepub fn foreground(&self)
pub fn foreground(&self)
Call the method when the app goes to foreground, such that the user can interact with it. The library starts running the background tasks more frequently to improve user experience.
Requires network: no
sourcepub fn background(&self)
pub fn background(&self)
Call the method when the app goes to background, such that the user can not interact with it. The library stops running some unnecessary tasks and runs necessary tasks less frequently. It should save battery and internet traffic.
Requires network: no
Auto Trait Implementations§
impl Freeze for Config
impl !RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl !UnwindSafe for Config
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Any
.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Any
.§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§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request