SettingsApi

Struct SettingsApi 

Source
pub struct SettingsApi<P: CheckedPermissions> { /* private fields */ }

Implementations§

Source§

impl<P: CheckedPermissions> SettingsApi<P>

Source

pub fn server_subscribe_system_theme<S>(&self, context: &mut ServerContext<S>)

Permission: os/settings / SubscribeSystemTheme

Groups: settings.appearance-display-read

Sender policy: signed

Grant timing: install-review

Subscribes to the crate::global::SystemTheme setting

Source

pub fn get_system_theme(&self) -> SystemTheme

Permission: os/settings / GetSystemTheme

Groups: settings.appearance-display-read

Sender policy: signed

Grant timing: install-review

Gets the value of the crate::global::SystemTheme setting

Source

pub fn set_system_theme(&self, value: impl Into<SystemTheme>)

Permission: os/settings / SetSystemTheme

Groups: settings.appearance-display-write

Sender policy: foundation-signed

Grant timing: policy-only

Sets the value of the crate::global::SystemTheme setting

Source§

impl<P: CheckedPermissions> SettingsApi<P>

Source

pub fn server_subscribe_screen_brightness<S>( &self, context: &mut ServerContext<S>, )

Permission: os/settings / SubscribeScreenBrightness

Groups: settings.appearance-display-read

Sender policy: signed

Grant timing: install-review

Subscribes to the crate::global::ScreenBrightness setting

Source

pub fn get_screen_brightness(&self) -> ScreenBrightness

Permission: os/settings / GetScreenBrightness

Groups: settings.appearance-display-read

Sender policy: signed

Grant timing: install-review

Gets the value of the crate::global::ScreenBrightness setting

Source

pub fn set_screen_brightness(&self, value: impl Into<ScreenBrightness>)

Permission: os/settings / SetScreenBrightness

Groups: settings.appearance-display-write

Sender policy: foundation-signed

Grant timing: policy-only

Sets the value of the crate::global::ScreenBrightness setting

Source§

impl<P: CheckedPermissions> SettingsApi<P>

Source

pub fn server_subscribe_onboarding_status<S>( &self, context: &mut ServerContext<S>, )

Permission: os/settings / SubscribeOnboardingStatus

Groups: settings.onboarding-backup-envoy

Sender policy: foundation-signed

Grant timing: policy-only

Subscribes to the crate::global::OnboardingStatus setting

Source

pub fn get_onboarding_status(&self) -> Option<OnboardingStatus>

Permission: os/settings / GetOnboardingStatus

Groups: settings.onboarding-backup-envoy

Sender policy: foundation-signed

Grant timing: policy-only

Gets the value of the crate::global::OnboardingStatus setting

Source

pub fn set_onboarding_status(&self, value: impl Into<OnboardingStatus>)

Permission: os/settings / SetOnboardingStatus

Groups: settings.onboarding-backup-envoy

Sender policy: foundation-signed

Grant timing: policy-only

Sets the value of the crate::global::OnboardingStatus setting

Source§

impl<P: CheckedPermissions> SettingsApi<P>

Source

pub fn server_subscribe_locale<S>(&self, context: &mut ServerContext<S>)

Permission: os/settings / SubscribeLocale

Groups: settings.locale-time-read

Sender policy: signed

Grant timing: install-review

Subscribes to the crate::global::Locale setting

Source

pub fn get_locale(&self) -> Locale

Permission: os/settings / GetLocale

Groups: settings.locale-time-read

Sender policy: signed

Grant timing: install-review

Gets the value of the crate::global::Locale setting

Source

pub fn set_locale(&self, value: impl Into<Locale>)

Permission: os/settings / SetLocale

Groups: settings.locale-time-write

Sender policy: foundation-signed

Grant timing: policy-only

Sets the value of the crate::global::Locale setting

Source§

impl<P: CheckedPermissions> SettingsApi<P>

Source

pub fn server_subscribe_device_name<S>(&self, context: &mut ServerContext<S>)

Permission: os/settings / SubscribeDeviceName

Groups: settings.device-behavior-read

Sender policy: signed

Grant timing: install-review

Subscribes to the crate::global::DeviceName setting

Source

pub fn get_device_name(&self) -> DeviceName

Permission: os/settings / GetDeviceName

Groups: settings.device-behavior-read

Sender policy: signed

Grant timing: install-review

Gets the value of the crate::global::DeviceName setting

Source

pub fn set_device_name(&self, value: impl Into<DeviceName>)

Permission: os/settings / SetDeviceName

Groups: settings.device-behavior-write

Sender policy: foundation-signed

Grant timing: policy-only

Sets the value of the crate::global::DeviceName setting

Source§

impl<P: CheckedPermissions> SettingsApi<P>

Source

pub fn server_subscribe_show_security_words<S>( &self, context: &mut ServerContext<S>, )

Permission: os/settings / SubscribeShowSecurityWords

Groups: settings.device-behavior-read

Sender policy: signed

Grant timing: install-review

Subscribes to the crate::global::ShowSecurityWords setting

Source

pub fn get_show_security_words(&self) -> ShowSecurityWords

Permission: os/settings / GetShowSecurityWords

Groups: settings.device-behavior-read

Sender policy: signed

Grant timing: install-review

Gets the value of the crate::global::ShowSecurityWords setting

Source

pub fn set_show_security_words(&self, value: impl Into<ShowSecurityWords>)

Permission: os/settings / SetShowSecurityWords

Groups: settings.device-behavior-write

Sender policy: foundation-signed

Grant timing: policy-only

Sets the value of the crate::global::ShowSecurityWords setting

Source§

impl<P: CheckedPermissions> SettingsApi<P>

Source

pub fn server_subscribe_auto_lock<S>(&self, context: &mut ServerContext<S>)

Permission: os/settings / SubscribeAutoLock

Groups: settings.device-behavior-read

Sender policy: signed

Grant timing: install-review

Subscribes to the crate::global::AutoLock setting

Source

pub fn get_auto_lock(&self) -> AutoLock

Permission: os/settings / GetAutoLock

Groups: settings.device-behavior-read

Sender policy: signed

Grant timing: install-review

Gets the value of the crate::global::AutoLock setting

Source

pub fn set_auto_lock(&self, value: impl Into<AutoLock>)

Permission: os/settings / SetAutoLock

Groups: settings.device-behavior-write

Sender policy: foundation-signed

Grant timing: policy-only

Sets the value of the crate::global::AutoLock setting

Source§

impl<P: CheckedPermissions> SettingsApi<P>

Source

pub fn server_subscribe_envoy_time_sync<S>( &self, context: &mut ServerContext<S>, )

Permission: os/settings / SubscribeEnvoyTimeSync

Groups: settings.onboarding-backup-envoy

Sender policy: foundation-signed

Grant timing: policy-only

Subscribes to the crate::global::EnvoyTimeSync setting

Source

pub fn get_envoy_time_sync(&self) -> EnvoyTimeSync

Permission: os/settings / GetEnvoyTimeSync

Groups: settings.onboarding-backup-envoy

Sender policy: foundation-signed

Grant timing: policy-only

Gets the value of the crate::global::EnvoyTimeSync setting

Source

pub fn set_envoy_time_sync(&self, value: impl Into<EnvoyTimeSync>)

Permission: os/settings / SetEnvoyTimeSync

Groups: settings.onboarding-backup-envoy

Sender policy: foundation-signed

Grant timing: policy-only

Sets the value of the crate::global::EnvoyTimeSync setting

Source§

impl<P: CheckedPermissions> SettingsApi<P>

Source

pub fn server_subscribe_use_standard_time_format<S>( &self, context: &mut ServerContext<S>, )

Permission: os/settings / SubscribeUseStandardTimeFormat

Groups: settings.locale-time-read

Sender policy: signed

Grant timing: install-review

Subscribes to the crate::global::UseStandardTimeFormat setting

Source

pub fn get_use_standard_time_format(&self) -> UseStandardTimeFormat

Permission: os/settings / GetUseStandardTimeFormat

Groups: settings.locale-time-read

Sender policy: signed

Grant timing: install-review

Gets the value of the crate::global::UseStandardTimeFormat setting

Source

pub fn set_use_standard_time_format( &self, value: impl Into<UseStandardTimeFormat>, )

Permission: os/settings / SetUseStandardTimeFormat

Groups: settings.locale-time-write

Sender policy: foundation-signed

Grant timing: policy-only

Sets the value of the crate::global::UseStandardTimeFormat setting

Source§

impl<P: CheckedPermissions> SettingsApi<P>

Source

pub fn server_subscribe_time_zone<S>(&self, context: &mut ServerContext<S>)

Permission: os/settings / SubscribeTimeZone

Groups: settings.locale-time-read

Sender policy: signed

Grant timing: install-review

Subscribes to the crate::global::TimeZone setting

Source

pub fn get_time_zone(&self) -> TimeZone

Permission: os/settings / GetTimeZone

Groups: settings.locale-time-read

Sender policy: signed

Grant timing: install-review

Gets the value of the crate::global::TimeZone setting

Source

pub fn set_time_zone(&self, value: impl Into<TimeZone>)

Permission: os/settings / SetTimeZone

Groups: settings.locale-time-write

Sender policy: foundation-signed

Grant timing: policy-only

Sets the value of the crate::global::TimeZone setting

Source§

impl<P: CheckedPermissions> SettingsApi<P>

Source

pub fn server_subscribe_debug_touch<S>(&self, context: &mut ServerContext<S>)

Permission: os/settings / SubscribeDebugTouch

Groups: settings.developer-system

Sender policy: static-server

Grant timing: policy-only

Subscribes to the crate::global::DebugTouch setting

Source

pub fn get_debug_touch(&self) -> DebugTouch

Permission: os/settings / GetDebugTouch

Groups: settings.developer-system

Sender policy: static-server

Grant timing: policy-only

Gets the value of the crate::global::DebugTouch setting

Source

pub fn set_debug_touch(&self, value: impl Into<DebugTouch>)

Permission: os/settings / SetDebugTouch

Groups: settings.developer-system

Sender policy: static-server

Grant timing: policy-only

Sets the value of the crate::global::DebugTouch setting

Source§

impl<P: CheckedPermissions> SettingsApi<P>

Source

pub fn server_subscribe_airlock_mode<S>(&self, context: &mut ServerContext<S>)

Permission: os/settings / SubscribeAirlockMode

Groups: settings.hardware-toggle-read

Sender policy: signed

Grant timing: install-review

Subscribes to the crate::global::AirlockMode setting

Source

pub fn get_airlock_mode(&self) -> AirlockMode

Permission: os/settings / GetAirlockMode

Groups: settings.hardware-toggle-read

Sender policy: signed

Grant timing: install-review

Gets the value of the crate::global::AirlockMode setting

Source

pub fn set_airlock_mode(&self, value: impl Into<AirlockMode>)

Permission: os/settings / SetAirlockMode

Groups: settings.hardware-toggle-write

Sender policy: foundation-signed

Grant timing: policy-only

Sets the value of the crate::global::AirlockMode setting

Source§

impl<P: CheckedPermissions> SettingsApi<P>

Source

pub fn server_subscribe_touch_offset<S>(&self, context: &mut ServerContext<S>)

Permission: os/settings / SubscribeTouchOffset

Groups: settings.device-behavior-read

Sender policy: signed

Grant timing: install-review

Subscribes to the crate::global::TouchOffset setting

Source

pub fn get_touch_offset(&self) -> TouchOffset

Permission: os/settings / GetTouchOffset

Groups: settings.device-behavior-read

Sender policy: signed

Grant timing: install-review

Gets the value of the crate::global::TouchOffset setting

Source

pub fn set_touch_offset(&self, value: impl Into<TouchOffset>)

Permission: os/settings / SetTouchOffset

Groups: settings.device-behavior-write

Sender policy: foundation-signed

Grant timing: policy-only

Sets the value of the crate::global::TouchOffset setting

Source§

impl<P: CheckedPermissions> SettingsApi<P>

Source

pub fn server_subscribe_magic_backup_enabled<S>( &self, context: &mut ServerContext<S>, )

Permission: os/settings / SubscribeMagicBackupEnabled

Groups: settings.onboarding-backup-envoy

Sender policy: foundation-signed

Grant timing: policy-only

Subscribes to the crate::global::MagicBackupEnabled setting

Source

pub fn get_magic_backup_enabled(&self) -> MagicBackupEnabled

Permission: os/settings / GetMagicBackupEnabled

Groups: settings.onboarding-backup-envoy

Sender policy: foundation-signed

Grant timing: policy-only

Gets the value of the crate::global::MagicBackupEnabled setting

Source

pub fn set_magic_backup_enabled(&self, value: impl Into<MagicBackupEnabled>)

Permission: os/settings / SetMagicBackupEnabled

Groups: settings.onboarding-backup-envoy

Sender policy: foundation-signed

Grant timing: policy-only

Sets the value of the crate::global::MagicBackupEnabled setting

Source§

impl<P: CheckedPermissions> SettingsApi<P>

Source

pub fn server_subscribe_nfc_enabled<S>(&self, context: &mut ServerContext<S>)

Permission: os/settings / SubscribeNfcEnabled

Groups: settings.hardware-toggle-read

Sender policy: signed

Grant timing: install-review

Subscribes to the crate::global::NfcEnabled setting

Source

pub fn get_nfc_enabled(&self) -> NfcEnabled

Permission: os/settings / GetNfcEnabled

Groups: settings.hardware-toggle-read

Sender policy: signed

Grant timing: install-review

Gets the value of the crate::global::NfcEnabled setting

Source

pub fn set_nfc_enabled(&self, value: impl Into<NfcEnabled>)

Permission: os/settings / SetNfcEnabled

Groups: settings.hardware-toggle-write

Sender policy: foundation-signed

Grant timing: policy-only

Sets the value of the crate::global::NfcEnabled setting

Source§

impl<P: CheckedPermissions> SettingsApi<P>

Source

pub fn server_subscribe_bluetooth_enabled<S>( &self, context: &mut ServerContext<S>, )

Permission: os/settings / SubscribeBluetoothEnabled

Groups: settings.hardware-toggle-read

Sender policy: signed

Grant timing: install-review

Subscribes to the crate::global::BluetoothEnabled setting

Source

pub fn get_bluetooth_enabled(&self) -> BluetoothEnabled

Permission: os/settings / GetBluetoothEnabled

Groups: settings.hardware-toggle-read

Sender policy: signed

Grant timing: install-review

Gets the value of the crate::global::BluetoothEnabled setting

Source

pub fn set_bluetooth_enabled(&self, value: impl Into<BluetoothEnabled>)

Permission: os/settings / SetBluetoothEnabled

Groups: settings.hardware-toggle-write

Sender policy: foundation-signed

Grant timing: policy-only

Sets the value of the crate::global::BluetoothEnabled setting

Source§

impl<P: CheckedPermissions> SettingsApi<P>

Source

pub fn server_subscribe_camera_enabled<S>(&self, context: &mut ServerContext<S>)

Permission: os/settings / SubscribeCameraEnabled

Groups: settings.hardware-toggle-read

Sender policy: signed

Grant timing: install-review

Subscribes to the crate::global::CameraEnabled setting

Source

pub fn get_camera_enabled(&self) -> CameraEnabled

Permission: os/settings / GetCameraEnabled

Groups: settings.hardware-toggle-read

Sender policy: signed

Grant timing: install-review

Gets the value of the crate::global::CameraEnabled setting

Source

pub fn set_camera_enabled(&self, value: impl Into<CameraEnabled>)

Permission: os/settings / SetCameraEnabled

Groups: settings.hardware-toggle-write

Sender policy: foundation-signed

Grant timing: policy-only

Sets the value of the crate::global::CameraEnabled setting

Source§

impl<P: CheckedPermissions> SettingsApi<P>

Source

pub fn server_subscribe_usb_enabled<S>(&self, context: &mut ServerContext<S>)

Permission: os/settings / SubscribeUsbEnabled

Groups: settings.hardware-toggle-read

Sender policy: signed

Grant timing: install-review

Subscribes to the crate::global::UsbEnabled setting

Source

pub fn get_usb_enabled(&self) -> UsbEnabled

Permission: os/settings / GetUsbEnabled

Groups: settings.hardware-toggle-read

Sender policy: signed

Grant timing: install-review

Gets the value of the crate::global::UsbEnabled setting

Source

pub fn set_usb_enabled(&self, value: impl Into<UsbEnabled>)

Permission: os/settings / SetUsbEnabled

Groups: settings.hardware-toggle-write

Sender policy: foundation-signed

Grant timing: policy-only

Sets the value of the crate::global::UsbEnabled setting

Source§

impl<P: CheckedPermissions> SettingsApi<P>

Source

pub fn server_subscribe_developer_mode<S>(&self, context: &mut ServerContext<S>)

Permission: os/settings / SubscribeDeveloperMode

Groups: settings.developer-system

Sender policy: static-server

Grant timing: policy-only

Subscribes to the crate::global::DeveloperMode setting

Source

pub fn get_developer_mode(&self) -> Option<DeveloperMode>

Permission: os/settings / GetDeveloperMode

Groups: settings.developer-system

Sender policy: static-server

Grant timing: policy-only

Gets the value of the crate::global::DeveloperMode setting

Source

pub fn set_developer_mode(&self, value: impl Into<DeveloperMode>)

Permission: os/settings / SetDeveloperMode

Groups: settings.developer-system

Sender policy: static-server

Grant timing: policy-only

Sets the value of the crate::global::DeveloperMode setting

Source§

impl<P: CheckedPermissions> SettingsApi<P>

Source

pub fn get_prime_color(&self) -> SystemTheme

Permission: os/settings / GetPrimeColor

Groups: settings.appearance-display-read

Sender policy: signed

Grant timing: install-review

Source

pub fn flush_settings(&self)

Permission: os/settings / FlushAll

Groups: settings.developer-system

Sender policy: static-server

Grant timing: policy-only

Source

pub fn wait_for_onboarding_complete(&self)

Permission: os/settings / SubscribeOnboardingStatus

Groups: settings.onboarding-backup-envoy

Sender policy: foundation-signed

Grant timing: policy-only

Source

pub fn lookup_timezone(&self, name: String, offset_minutes: i32) -> TimeZone

Permission: os/settings / LookupTimeZone

Groups: settings.locale-time-read

Sender policy: signed

Grant timing: install-review

Trait Implementations§

Source§

impl<P: Clone + CheckedPermissions> Clone for SettingsApi<P>

Source§

fn clone(&self) -> SettingsApi<P>

Returns a duplicate 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<P: Debug + CheckedPermissions> Debug for SettingsApi<P>

Source§

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

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

impl<P: Default + CheckedPermissions> Default for SettingsApi<P>

Source§

fn default() -> SettingsApi<P>

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

Auto Trait Implementations§

§

impl<P> Freeze for SettingsApi<P>

§

impl<P> RefUnwindSafe for SettingsApi<P>

§

impl<P> Send for SettingsApi<P>

§

impl<P> Sync for SettingsApi<P>

§

impl<P> Unpin for SettingsApi<P>

§

impl<P> UnwindSafe for SettingsApi<P>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> ArchivePointee for T

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where 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.

§

impl<T> LayoutRaw for T

§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
§

impl<T> Pointee for T

§

type Metadata = ()

The metadata type for pointers and references to this type.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.