Skip to main content
KeyOS API Reference

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

Permission group: settings.ui-essentials

Required signature: thirdParty

Approval: autoAllow

Subscribes to the crate::global::SystemTheme setting

Source

pub fn get_system_theme(&self) -> SystemTheme

Permission: os/settings / GetSystemTheme

Permission group: settings.ui-essentials

Required signature: thirdParty

Approval: autoAllow

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

Source§

impl<P: CheckedPermissions> SettingsApi<P>

Source

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

Permission: os/settings / SubscribeLocale

Permission group: settings.ui-essentials

Required signature: thirdParty

Approval: autoAllow

Subscribes to the crate::global::Locale setting

Source

pub fn get_locale(&self) -> Locale

Permission: os/settings / GetLocale

Permission group: settings.ui-essentials

Required signature: thirdParty

Approval: autoAllow

Gets 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

Permission group: settings.ui-essentials

Required signature: thirdParty

Approval: autoAllow

Subscribes to the crate::global::DeviceName setting

Source

pub fn get_device_name(&self) -> DeviceName

Permission: os/settings / GetDeviceName

Permission group: settings.ui-essentials

Required signature: thirdParty

Approval: autoAllow

Gets the value of the crate::global::DeviceName 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

Permission group: settings.ui-essentials

Required signature: thirdParty

Approval: autoAllow

Subscribes to the crate::global::UseStandardTimeFormat setting

Source

pub fn get_use_standard_time_format(&self) -> UseStandardTimeFormat

Permission: os/settings / GetUseStandardTimeFormat

Permission group: settings.ui-essentials

Required signature: thirdParty

Approval: autoAllow

Gets 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

Permission group: settings.ui-essentials

Required signature: thirdParty

Approval: autoAllow

Subscribes to the crate::global::TimeZone setting

Source

pub fn get_time_zone(&self) -> TimeZone

Permission: os/settings / GetTimeZone

Permission group: settings.ui-essentials

Required signature: thirdParty

Approval: autoAllow

Gets 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

Permission group: settings.ui-essentials

Required signature: thirdParty

Approval: autoAllow

Subscribes to the crate::global::DebugTouch setting

Source

pub fn get_debug_touch(&self) -> DebugTouch

Permission: os/settings / GetDebugTouch

Permission group: settings.ui-essentials

Required signature: thirdParty

Approval: autoAllow

Gets 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

Permission group: device-connectivity.usb-device-status

Required signature: thirdParty

Approval: autoAllow

Subscribes to the crate::global::AirlockMode setting

Source

pub fn get_airlock_mode(&self) -> AirlockMode

Permission: os/settings / GetAirlockMode

Permission group: device-connectivity.usb-device-status

Required signature: thirdParty

Approval: autoAllow

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

Source§

impl<P: CheckedPermissions> SettingsApi<P>

Source

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

Permission: os/settings / SubscribeUsbEnabled

Permission group: device-connectivity.usb-device-status

Required signature: thirdParty

Approval: autoAllow

Subscribes to the crate::global::UsbEnabled setting

Source

pub fn get_usb_enabled(&self) -> UsbEnabled

Permission: os/settings / GetUsbEnabled

Permission group: device-connectivity.usb-device-status

Required signature: thirdParty

Approval: autoAllow

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

Source§

impl<P: CheckedPermissions> SettingsApi<P>

Source

pub fn get_prime_color(&self) -> SystemTheme

Permission: os/settings / GetPrimeColor

Permission group: settings.ui-essentials

Required signature: thirdParty

Approval: autoAllow

Source

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

Permission: os/settings / LookupTimeZone

Permission group: settings.ui-essentials

Required signature: thirdParty

Approval: autoAllow

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§

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> UnsafeUnpin for SettingsApi<P>

§

impl<P> UnwindSafe for SettingsApi<P>

Blanket Implementations§

§

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

§

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.
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

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

§

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
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

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.
§

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

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

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

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

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

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.