pub struct Preferences { /* private fields */ }Expand description
Re-exports the corresponding SystemConfiguration wrappers.
Wraps SCPreferencesRef.
Implementations§
Source§impl Preferences
impl Preferences
Wraps SCPreferencesCreateWithAuthorization.
§Safety
authorization must be a valid AuthorizationRef obtained from a
compatible Security-framework binding, and it must remain valid for the
lifetime requirements imposed by SCPreferences.
Sourcepub fn new_with_callback<F>(
name: &str,
prefs_id: Option<&str>,
callback: F,
) -> Result<Self>
pub fn new_with_callback<F>( name: &str, prefs_id: Option<&str>, callback: F, ) -> Result<Self>
Wraps SCPreferencesCreate with SCPreferencesSetCallback.
Wraps SCPreferencesCreateWithAuthorization with SCPreferencesSetCallback.
§Safety
authorization must be a valid AuthorizationRef obtained from a
compatible Security-framework binding, and it must remain valid for the
lifetime requirements imposed by SCPreferences.
Sourcepub fn set_callback<F>(&mut self, callback: F) -> Result<()>
pub fn set_callback<F>(&mut self, callback: F) -> Result<()>
Wraps a helper on SCPreferencesRef.
Sourcepub fn clear_callback(&mut self) -> Result<()>
pub fn clear_callback(&mut self) -> Result<()>
Wraps a helper on SCPreferencesRef.
Sourcepub fn schedule_with_run_loop_current(&self) -> Result<()>
pub fn schedule_with_run_loop_current(&self) -> Result<()>
Wraps SCPreferencesScheduleWithRunLoopCurrent.
Sourcepub fn unschedule_from_run_loop_current(&self) -> Result<()>
pub fn unschedule_from_run_loop_current(&self) -> Result<()>
Wraps SCPreferencesUnscheduleFromRunLoopCurrent.
Sourcepub fn set_dispatch_queue_global(&self) -> Result<()>
pub fn set_dispatch_queue_global(&self) -> Result<()>
Wraps SCPreferencesSetDispatchQueueGlobal.
Sourcepub fn clear_dispatch_queue(&self) -> Result<()>
pub fn clear_dispatch_queue(&self) -> Result<()>
Wraps SCPreferencesClearDispatchQueue.
Sourcepub fn commit_changes(&self) -> Result<()>
pub fn commit_changes(&self) -> Result<()>
Wraps SCPreferencesCommitChanges.
Sourcepub fn apply_changes(&self) -> Result<()>
pub fn apply_changes(&self) -> Result<()>
Wraps SCPreferencesApplyChanges.
Sourcepub fn synchronize(&self)
pub fn synchronize(&self)
Wraps SCPreferencesSynchronize.
Sourcepub fn copy_key_list(&self) -> Vec<String>
pub fn copy_key_list(&self) -> Vec<String>
Wraps SCPreferencesCopyKeyList.
Sourcepub fn get_value(&self, key: &str) -> Result<Option<PropertyList>>
pub fn get_value(&self, key: &str) -> Result<Option<PropertyList>>
Wraps SCPreferencesGetValue.
Sourcepub fn add_value(&self, key: &str, value: &PropertyList) -> Result<()>
pub fn add_value(&self, key: &str, value: &PropertyList) -> Result<()>
Wraps SCPreferencesAddValue.
Sourcepub fn set_value(&self, key: &str, value: &PropertyList) -> Result<()>
pub fn set_value(&self, key: &str, value: &PropertyList) -> Result<()>
Wraps SCPreferencesSetValue.
Sourcepub fn remove_value(&self, key: &str) -> Result<()>
pub fn remove_value(&self, key: &str) -> Result<()>
Wraps SCPreferencesRemoveValue.
Sourcepub fn path_create_unique_child(&self, prefix: &str) -> Result<Option<String>>
pub fn path_create_unique_child(&self, prefix: &str) -> Result<Option<String>>
Wraps SCPreferencesPathCreateUniqueChild.
Sourcepub fn path_get_value(&self, path: &str) -> Result<Option<PropertyList>>
pub fn path_get_value(&self, path: &str) -> Result<Option<PropertyList>>
Wraps SCPreferencesPathGetValue.
Sourcepub fn path_get_link(&self, path: &str) -> Result<Option<String>>
pub fn path_get_link(&self, path: &str) -> Result<Option<String>>
Wraps SCPreferencesPathGetLink.
Sourcepub fn path_set_value(&self, path: &str, value: &PropertyList) -> Result<()>
pub fn path_set_value(&self, path: &str, value: &PropertyList) -> Result<()>
Wraps SCPreferencesPathSetValue.
Sourcepub fn path_set_link(&self, path: &str, link: &str) -> Result<()>
pub fn path_set_link(&self, path: &str, link: &str) -> Result<()>
Wraps SCPreferencesPathSetLink.
Sourcepub fn path_remove_value(&self, path: &str) -> Result<()>
pub fn path_remove_value(&self, path: &str) -> Result<()>
Wraps SCPreferencesPathRemoveValue.
Sourcepub fn set_computer_name(&self, name: Option<&str>) -> Result<()>
pub fn set_computer_name(&self, name: Option<&str>) -> Result<()>
Wraps SCPreferencesSetComputerName.
Sourcepub fn set_local_host_name(&self, name: Option<&str>) -> Result<()>
pub fn set_local_host_name(&self, name: Option<&str>) -> Result<()>
Wraps SCPreferencesSetLocalHostName.
Sourcepub fn network_services(&self) -> Vec<NetworkService>
pub fn network_services(&self) -> Vec<NetworkService>
Wraps a helper on SCPreferencesRef.
Trait Implementations§
Source§impl Clone for Preferences
impl Clone for Preferences
Source§fn clone(&self) -> Preferences
fn clone(&self) -> Preferences
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more