pub struct DynamicStore { /* private fields */ }Expand description
Re-exports the corresponding SystemConfiguration wrappers.
Wraps SCDynamicStoreRef.
Implementations§
Source§impl DynamicStore
impl DynamicStore
Sourcepub fn new_with_session_keys(name: &str) -> Result<Self>
pub fn new_with_session_keys(name: &str) -> Result<Self>
Wraps SCDynamicStoreCreate with session-key notifications enabled.
Sourcepub fn new_with_options(name: &str, options: &PropertyList) -> Result<Self>
pub fn new_with_options(name: &str, options: &PropertyList) -> Result<Self>
options must encode a dictionary accepted by SCDynamicStoreCreateWithOptions.
Use new_with_session_keys for the common session-keys configuration.
Sourcepub fn new_with_callback<F>(name: &str, callback: F) -> Result<Self>
pub fn new_with_callback<F>(name: &str, callback: F) -> Result<Self>
Wraps SCDynamicStoreCreate with an SCDynamicStoreCallBack.
Sourcepub fn new_with_options_and_callback<F>(
name: &str,
options: &PropertyList,
callback: F,
) -> Result<Self>
pub fn new_with_options_and_callback<F>( name: &str, options: &PropertyList, callback: F, ) -> Result<Self>
options must encode a dictionary accepted by SCDynamicStoreCreateWithOptions.
Use new_with_session_keys_and_callback for the common session-keys configuration.
Sourcepub fn new_with_session_keys_and_callback<F>(
name: &str,
callback: F,
) -> Result<Self>
pub fn new_with_session_keys_and_callback<F>( name: &str, callback: F, ) -> Result<Self>
Wraps SCDynamicStoreCreate with session-key notifications and an SCDynamicStoreCallBack.
Sourcepub fn copy_value(&self, key: &str) -> Result<Option<PropertyList>>
pub fn copy_value(&self, key: &str) -> Result<Option<PropertyList>>
Wraps SCDynamicStoreCopyValue.
Sourcepub fn copy_multiple<K, P>(
&self,
keys: &[K],
patterns: &[P],
) -> Result<Option<PropertyList>>
pub fn copy_multiple<K, P>( &self, keys: &[K], patterns: &[P], ) -> Result<Option<PropertyList>>
Wraps SCDynamicStoreCopyMultiple.
Sourcepub fn add_value(&self, key: &str, value: &PropertyList) -> Result<()>
pub fn add_value(&self, key: &str, value: &PropertyList) -> Result<()>
Wraps SCDynamicStoreAddValue.
Sourcepub fn add_temporary_value(&self, key: &str, value: &PropertyList) -> Result<()>
pub fn add_temporary_value(&self, key: &str, value: &PropertyList) -> Result<()>
Wraps SCDynamicStoreAddTemporaryValue.
Sourcepub fn set_value(&self, key: &str, value: &PropertyList) -> Result<()>
pub fn set_value(&self, key: &str, value: &PropertyList) -> Result<()>
Wraps SCDynamicStoreSetValue.
Sourcepub fn set_multiple<R, N>(
&self,
keys_to_set: Option<&PropertyList>,
keys_to_remove: &[R],
keys_to_notify: &[N],
) -> Result<()>
pub fn set_multiple<R, N>( &self, keys_to_set: Option<&PropertyList>, keys_to_remove: &[R], keys_to_notify: &[N], ) -> Result<()>
Wraps SCDynamicStoreSetMultiple.
Sourcepub fn remove_value(&self, key: &str) -> Result<()>
pub fn remove_value(&self, key: &str) -> Result<()>
Wraps SCDynamicStoreRemoveValue.
Sourcepub fn notify_value(&self, key: &str) -> Result<()>
pub fn notify_value(&self, key: &str) -> Result<()>
Wraps SCDynamicStoreNotifyValue.
Sourcepub fn copy_key_list(&self, pattern: &str) -> Result<Vec<String>>
pub fn copy_key_list(&self, pattern: &str) -> Result<Vec<String>>
Wraps SCDynamicStoreCopyKeyList.
Sourcepub fn set_notification_keys<K, P>(
&self,
keys: &[K],
patterns: &[P],
) -> Result<()>
pub fn set_notification_keys<K, P>( &self, keys: &[K], patterns: &[P], ) -> Result<()>
Wraps SCDynamicStoreSetNotificationKeys.
Sourcepub fn create_run_loop_source(
&self,
order: isize,
) -> Result<DynamicStoreRunLoopSource>
pub fn create_run_loop_source( &self, order: isize, ) -> Result<DynamicStoreRunLoopSource>
Wraps SCDynamicStoreCreateRunLoopSource.
Sourcepub fn set_dispatch_queue_global(&self) -> Result<()>
pub fn set_dispatch_queue_global(&self) -> Result<()>
Wraps SCDynamicStoreSetDispatchQueueGlobal.
Sourcepub fn clear_dispatch_queue(&self) -> Result<()>
pub fn clear_dispatch_queue(&self) -> Result<()>
Wraps SCDynamicStoreClearDispatchQueue.
Sourcepub fn copy_notified_keys(&self) -> Vec<String>
pub fn copy_notified_keys(&self) -> Vec<String>
Wraps SCDynamicStoreCopyNotifiedKeys.
Sourcepub fn computer_name(&self) -> Option<String>
pub fn computer_name(&self) -> Option<String>
Wraps SCDynamicStoreCopyComputerName.
Sourcepub fn local_host_name(&self) -> Option<String>
pub fn local_host_name(&self) -> Option<String>
Wraps SCDynamicStoreCopyLocalHostName.
Sourcepub fn proxies(&self) -> Option<PropertyList>
pub fn proxies(&self) -> Option<PropertyList>
Wraps SCDynamicStoreCopyProxies.
Sourcepub fn dhcp_info(
&self,
service_id: Option<&str>,
) -> Result<Option<PropertyList>>
pub fn dhcp_info( &self, service_id: Option<&str>, ) -> Result<Option<PropertyList>>
Wraps SCDynamicStoreCopyDHCPInfo.
Sourcepub fn dhcp_option_data(info: &PropertyList, code: u8) -> Option<PropertyList>
pub fn dhcp_option_data(info: &PropertyList, code: u8) -> Option<PropertyList>
Wraps SCDHCPInfoCopyOptionData.
Sourcepub fn dhcp_lease_start_time(info: &PropertyList) -> Option<PropertyList>
pub fn dhcp_lease_start_time(info: &PropertyList) -> Option<PropertyList>
Wraps SCDHCPInfoCopyLeaseStartTime.
Sourcepub fn dhcp_lease_expiration_time(info: &PropertyList) -> Option<PropertyList>
pub fn dhcp_lease_expiration_time(info: &PropertyList) -> Option<PropertyList>
Wraps SCDHCPInfoCopyLeaseExpirationTime.
Sourcepub fn key_create<A: AsRef<str>>(
format: &str,
arguments: &[A],
) -> Result<String>
pub fn key_create<A: AsRef<str>>( format: &str, arguments: &[A], ) -> Result<String>
Wraps SCDynamicStoreKeyCreate.
Sourcepub fn network_global_entity_key(domain: &str, entity: &str) -> Result<String>
pub fn network_global_entity_key(domain: &str, entity: &str) -> Result<String>
Wraps SCDynamicStoreKeyCreateNetworkGlobalEntity.
Sourcepub fn network_interface_key(domain: &str) -> Result<String>
pub fn network_interface_key(domain: &str) -> Result<String>
Wraps SCDynamicStoreKeyCreateNetworkInterface.
Sourcepub fn network_interface_entity_key(
domain: &str,
interface_name: &str,
entity: Option<&str>,
) -> Result<String>
pub fn network_interface_entity_key( domain: &str, interface_name: &str, entity: Option<&str>, ) -> Result<String>
Wraps SCDynamicStoreKeyCreateNetworkInterfaceEntity.
Sourcepub fn network_service_entity_key(
domain: &str,
service_id: &str,
entity: Option<&str>,
) -> Result<String>
pub fn network_service_entity_key( domain: &str, service_id: &str, entity: Option<&str>, ) -> Result<String>
Wraps SCDynamicStoreKeyCreateNetworkServiceEntity.
Sourcepub fn computer_name_key() -> Result<String>
pub fn computer_name_key() -> Result<String>
Wraps SCDynamicStoreKeyCreateComputerName.
Sourcepub fn console_user_key() -> Result<String>
pub fn console_user_key() -> Result<String>
Wraps SCDynamicStoreKeyCreateConsoleUser.
Sourcepub fn host_names_key() -> Result<String>
pub fn host_names_key() -> Result<String>
Wraps SCDynamicStoreKeyCreateHostNames.
Sourcepub fn location_key() -> Result<String>
pub fn location_key() -> Result<String>
Wraps SCDynamicStoreKeyCreateLocation.
Sourcepub fn proxies_key() -> Result<String>
pub fn proxies_key() -> Result<String>
Wraps SCDynamicStoreKeyCreateProxies.
Trait Implementations§
Source§impl Clone for DynamicStore
impl Clone for DynamicStore
Source§fn clone(&self) -> DynamicStore
fn clone(&self) -> DynamicStore
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more