Struct ashpd::desktop::settings::SettingsProxy [−][src]
pub struct SettingsProxy<'a>(_);
Expand description
The interface provides read-only access to a small number of host settings required for toolkits similar to XSettings. It is not for general purpose settings.
Implementations
Create a new instance of SettingsProxy
.
Reads a single value. Returns an error on any unknown namespace or key.
Returns a HashMap
of namespaces to its keys and values.
Arguments
namespaces
- List of namespaces to filter results by.
If namespaces
is an empty array or contains an empty string it matches
all. Globing is supported but only for trailing sections, e.g.
“org.example.*”.
pub async fn read<T>(&self, namespace: &str, key: &str) -> Result<T, Error> where
T: TryFrom<OwnedValue> + DeserializeOwned + Type,
pub async fn read<T>(&self, namespace: &str, key: &str) -> Result<T, Error> where
T: TryFrom<OwnedValue> + DeserializeOwned + Type,
Reads a single value. Returns an error on any unknown namespace or key.
Returns the value key
is to to as a zvariant::OwnedValue
.
Arguments
namespace
- Namespace to look up key in.key
- The key to get.
Signal emitted when a setting changes.
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for SettingsProxy<'a>
impl<'a> Send for SettingsProxy<'a>
impl<'a> Sync for SettingsProxy<'a>
impl<'a> Unpin for SettingsProxy<'a>
impl<'a> !UnwindSafe for SettingsProxy<'a>