Struct libhealth::core::Settings

source ·
pub struct Settings(_);

Implementations§

source§

impl Settings

source

pub fn did_initial_setup(&self) -> bool

Get value of GSettings key

source

pub fn set_did_initial_setup(&self, value: bool)

Set value of GSettings key

source

pub fn connect_did_initial_setup_changed<F: Fn(&Settings, &str) + 'static>( &self, f: F ) -> SignalHandlerId

Connect to value changes of this key. Keep in mind that the key has to be read once before connecting or this won’t do anything!

source

pub fn enable_notifications(&self) -> bool

Get value of GSettings key

source

pub fn set_enable_notifications(&self, value: bool)

Set value of GSettings key

source

pub fn connect_enable_notifications_changed<F: Fn(&Settings, &str) + 'static>( &self, f: F ) -> SignalHandlerId

Connect to value changes of this key. Keep in mind that the key has to be read once before connecting or this won’t do anything!

source

pub fn sync_provider_setup_google_fit(&self) -> bool

Get value of GSettings key

source

pub fn set_sync_provider_setup_google_fit(&self, value: bool)

Set value of GSettings key

source

pub fn connect_sync_provider_setup_google_fit_changed<F: Fn(&Settings, &str) + 'static>( &self, f: F ) -> SignalHandlerId

Connect to value changes of this key. Keep in mind that the key has to be read once before connecting or this won’t do anything!

source

pub fn user_age(&self) -> u32

Get value of GSettings key

source

pub fn set_user_age(&self, value: u32)

Set value of GSettings key

source

pub fn connect_user_age_changed<F: Fn(&Settings, &str) + 'static>( &self, f: F ) -> SignalHandlerId

Connect to value changes of this key. Keep in mind that the key has to be read once before connecting or this won’t do anything!

source

pub fn user_step_goal(&self) -> u32

Get value of GSettings key

source

pub fn set_user_step_goal(&self, value: u32)

Set value of GSettings key

source

pub fn connect_user_step_goal_changed<F: Fn(&Settings, &str) + 'static>( &self, f: F ) -> SignalHandlerId

Connect to value changes of this key. Keep in mind that the key has to be read once before connecting or this won’t do anything!

source

pub fn window_height(&self) -> i32

Get value of GSettings key

source

pub fn set_window_height(&self, value: i32)

Set value of GSettings key

source

pub fn connect_window_height_changed<F: Fn(&Settings, &str) + 'static>( &self, f: F ) -> SignalHandlerId

Connect to value changes of this key. Keep in mind that the key has to be read once before connecting or this won’t do anything!

source

pub fn window_is_maximized(&self) -> bool

Get value of GSettings key

source

pub fn set_window_is_maximized(&self, value: bool)

Set value of GSettings key

source

pub fn connect_window_is_maximized_changed<F: Fn(&Settings, &str) + 'static>( &self, f: F ) -> SignalHandlerId

Connect to value changes of this key. Keep in mind that the key has to be read once before connecting or this won’t do anything!

source

pub fn window_width(&self) -> i32

Get value of GSettings key

source

pub fn set_window_width(&self, value: i32)

Set value of GSettings key

source

pub fn connect_window_width_changed<F: Fn(&Settings, &str) + 'static>( &self, f: F ) -> SignalHandlerId

Connect to value changes of this key. Keep in mind that the key has to be read once before connecting or this won’t do anything!

source

pub fn active_user_id(&self) -> u32

Get value of GSettings key

source

pub fn set_active_user_id(&self, value: u32)

Set value of GSettings key

source

pub fn connect_active_user_id_changed<F: Fn(&Settings, &str) + 'static>( &self, f: F ) -> SignalHandlerId

Connect to value changes of this key. Keep in mind that the key has to be read once before connecting or this won’t do anything!

source

pub fn bind<'a, P: IsA<Object>>( &'a self, key: &'a str, object: &'a P, property: &'a str ) -> BindingBuilder<'a>

source

pub fn connect_changed<F: Fn(&Settings, &str) + 'static>( &self, detail: Option<&str>, f: F ) -> SignalHandlerId

source

pub fn disconnect(&self, handler_id: SignalHandlerId)

source§

impl Settings

source

pub fn instance() -> Self

source

pub fn enabled_plugins(&self) -> Vec<PluginName>

Get an array of recent activity IDs.

source

pub fn set_enabled_plugins(&self, value: &[PluginName])

Set an array of recent activity IDs.

source

pub fn recent_activity_types(&self) -> Vec<String>

Get an array of recent activity IDs.

source

pub fn set_recent_activity_types(&self, value: &[&str])

Set an array of recent activity IDs.

source

pub fn timestamp_last_sync_google_fit(&self) -> DateTime

Get the timestamp of the last sync with Google Fit.

source

pub fn set_timestamp_last_sync_google_fit(&self, value: DateTime)

Set the timestamp of the last sync with Google Fit.

source

pub fn connect_unit_system_changed<F: Fn(&Settings, &str) + 'static>( &self, f: F ) -> SignalHandlerId

Connect to the unitsystem key changing. Keep in mind that the key has to be read once before connecting or this won’t do anything!

source

pub fn notification_frequency(&self) -> NotificationFrequency

Get the current notification frequency.

source

pub fn set_notification_frequency(&self, value: NotificationFrequency)

Set the current notification frequency.

source

pub fn connect_notification_frequency_changed<F: Fn(&Settings, &str) + 'static>( &self, f: F ) -> SignalHandlerId

Connect to the notification-frequency key changing. Keep in mind that the key has to be read once before connecting or this won’t do anything!

source

pub fn notification_time(&self) -> Time

source

pub fn set_notification_time(&self, value: Time)

source

pub fn connect_notification_time_changed<F: Fn(&Settings, &str) + 'static>( &self, f: F ) -> SignalHandlerId

Connect to the notification-time key changing. Keep in mind that the key has to be read once before connecting or this won’t do anything!

source

pub fn unit_system(&self) -> UnitSystem

Get the current unit system.

source

pub fn set_unit_system(&self, value: UnitSystem)

Set the current unit system.

source

pub fn user_birthday(&self) -> Option<DateTime>

Get the timestamp of the last sync with Google Fit.

source

pub fn set_user_birthday(&self, value: DateTime)

Set the timestamp of the last sync with Google Fit.

source

pub fn user_height(&self) -> Length

Get the user’s height.

source

pub fn set_user_height(&self, value: Length)

Set the user’s height.

source

pub fn connect_user_weight_goal_changed<F: Fn(&Settings, &str) + 'static>( &self, f: F ) -> SignalHandlerId

Connect to the user-weightgoal key changing. Keep in mind that the key has to be read once before connecting or this won’t do anything!

source

pub fn user_weight_goal(&self) -> Option<Mass>

Get the user’s current weightgoal.

source

pub fn set_user_weight_goal(&self, value: Mass)

Set the user’s current weightgoal.

Trait Implementations§

source§

impl Clone for Settings

source§

fn clone(&self) -> Settings

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Settings

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Settings

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> DynClone for Twhere T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V