[][src]Struct system_configuration::dynamic_store::SCDynamicStore

pub struct SCDynamicStore(_);

Access to the key-value pairs in the dynamic store of a running system.

Use the SCDynamicStoreBuilder to create instances of this.

Implementations

impl SCDynamicStore[src]

pub fn get_keys<S: Into<CFString>>(
    &self,
    pattern: S
) -> Option<CFArray<CFString>>
[src]

Returns the keys that represent the current dynamic store entries that match the specified pattern. Or None if an error occured.

pattern - A regular expression pattern used to match the dynamic store keys.

pub fn get_proxies(&self) -> Option<CFDictionary<CFString, CFType>>[src]

Returns the key-value pairs that represent the current internet proxy settings. Or None if no proxy settings have been defined or if an error occured.

pub fn get<S: Into<CFString>>(&self, key: S) -> Option<CFPropertyList>[src]

If the given key exists in the store, the associated value is returned.

Use CFPropertyList::downcast_into to cast the result into the correct type.

pub fn set<S: Into<CFString>, V: CFPropertyListSubClass>(
    &self,
    key: S,
    value: V
) -> bool
[src]

Sets the value of the given key. Overwrites existing values. Returns true on success, false on failure.

pub fn set_raw<S: Into<CFString>>(&self, key: S, value: &CFPropertyList) -> bool[src]

Sets the value of the given key. Overwrites existing values. Returns true on success, false on failure.

pub fn remove<S: Into<CFString>>(&self, key: S) -> bool[src]

Removes the value of the specified key from the dynamic store.

pub fn set_notification_keys<T1, T2>(
    &self,
    keys: &CFArray<T1>,
    patterns: &CFArray<T2>
) -> bool
[src]

Specifies a set of keys and key patterns that should be monitored for changes.

pub fn create_run_loop_source(&self) -> CFRunLoopSource[src]

Creates a run loop source object that can be added to the application's run loop.

Trait Implementations

impl Clone for SCDynamicStore[src]

impl ConcreteCFType for SCDynamicStore[src]

impl Drop for SCDynamicStore[src]

impl Eq for SCDynamicStore[src]

impl PartialEq<SCDynamicStore> for SCDynamicStore[src]

impl TCFType for SCDynamicStore[src]

type Ref = SCDynamicStoreRef

The reference type wrapped inside this type.

impl<'a> ToVoid<SCDynamicStore> for &'a SCDynamicStore[src]

impl ToVoid<SCDynamicStore> for SCDynamicStore[src]

impl ToVoid<SCDynamicStore> for SCDynamicStoreRef[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> FromMutVoid for T where
    T: TCFType
[src]

impl<T> FromVoid for T where
    T: TCFType
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.