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.
Methods
impl SCDynamicStore[src]
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.
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.
fn set<S: Into<CFString>, V: CFPropertyListSubClass>(
&self,
key: S,
value: V
) -> bool[src]
&self,
key: S,
value: V
) -> bool
Sets the value of the given key. Overwrites existing values.
Returns true on success, false on failure.
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.
fn remove<S: Into<CFString>>(&self, key: S) -> bool[src]
fn set_notification_keys<T1, T2>(
&self,
keys: &CFArray<T1>,
patterns: &CFArray<T2>
) -> bool[src]
&self,
keys: &CFArray<T1>,
patterns: &CFArray<T2>
) -> bool
Specifies a set of keys and key patterns that should be monitored for changes.
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 Drop for SCDynamicStore
impl TCFType for SCDynamicStore
type Ref = SCDynamicStoreRef
The reference type wrapped inside this type.
fn as_concrete_TypeRef(&self) -> SCDynamicStoreRef
Returns the object as its concrete TypeRef.
unsafe fn wrap_under_get_rule(reference: SCDynamicStoreRef) -> SCDynamicStore
Returns an instance of the object, wrapping the underlying CFTypeRef subclass. Use this when following Core Foundation's "Get Rule". The reference count is bumped. Read more
fn as_CFTypeRef(&self) -> CFTypeRef
Returns the object as a raw CFTypeRef. The reference count is not adjusted.
unsafe fn wrap_under_create_rule(reference: SCDynamicStoreRef) -> SCDynamicStore
Returns an instance of the object, wrapping the underlying CFTypeRef subclass. Use this when following Core Foundation's "Create Rule". The reference count is not bumped. Read more
fn type_id() -> CFTypeID
Returns the type ID for this class.
fn as_CFType(&self) -> CFType[src]
Returns the object as a wrapped CFType. The reference count is incremented by one.
fn into_CFType(self) -> CFType[src]
Returns the object as a wrapped CFType. Consumes self and avoids changing the reference count. Read more
fn retain_count(&self) -> i32[src]
Returns the reference count of the object. It is unwise to do anything other than test whether the return value of this method is greater than zero. Read more
fn type_of(&self) -> u32[src]
Returns the type ID of this object.
fn show(&self)[src]
Writes a debugging version of this object on standard error.
fn instance_of<OtherCFType>(&self) -> bool where
OtherCFType: TCFType, [src]
OtherCFType: TCFType,
Returns true if this value is an instance of another type.
impl Clone for SCDynamicStore
fn clone(&self) -> SCDynamicStore
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl PartialEq for SCDynamicStore
fn eq(&self, other: &SCDynamicStore) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
This method tests for !=.