pub struct Preferences { /* private fields */ }Implementations§
Source§impl Preferences
impl Preferences
pub fn type_id() -> u64
pub fn new(name: &str, prefs_id: Option<&str>) -> Result<Self>
§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.
pub fn new_with_callback<F>( name: &str, prefs_id: Option<&str>, callback: F, ) -> Result<Self>
§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.
pub fn set_callback<F>(&mut self, callback: F) -> Result<()>
pub fn clear_callback(&mut self) -> Result<()>
pub fn schedule_with_run_loop_current(&self) -> Result<()>
pub fn unschedule_from_run_loop_current(&self) -> Result<()>
pub fn set_dispatch_queue_global(&self) -> Result<()>
pub fn clear_dispatch_queue(&self) -> Result<()>
pub fn lock(&self, wait: bool) -> Result<()>
pub fn commit_changes(&self) -> Result<()>
pub fn apply_changes(&self) -> Result<()>
pub fn unlock(&self) -> Result<()>
pub fn synchronize(&self)
pub fn signature(&self) -> Option<String>
pub fn copy_key_list(&self) -> Vec<String>
pub fn get_value(&self, key: &str) -> Result<Option<PropertyList>>
pub fn add_value(&self, key: &str, value: &PropertyList) -> Result<()>
pub fn set_value(&self, key: &str, value: &PropertyList) -> Result<()>
pub fn remove_value(&self, key: &str) -> Result<()>
pub fn path_create_unique_child(&self, prefix: &str) -> Result<Option<String>>
pub fn path_get_value(&self, path: &str) -> Result<Option<PropertyList>>
pub fn path_get_link(&self, path: &str) -> Result<Option<String>>
pub fn path_set_value(&self, path: &str, value: &PropertyList) -> Result<()>
pub fn path_set_link(&self, path: &str, link: &str) -> Result<()>
pub fn path_remove_value(&self, path: &str) -> Result<()>
pub fn set_computer_name(&self, name: Option<&str>) -> Result<()>
pub fn set_local_host_name(&self, name: Option<&str>) -> Result<()>
pub fn network_services(&self) -> Vec<NetworkService>
Trait Implementations§
Source§impl Clone for Preferences
impl Clone for Preferences
Source§fn clone(&self) -> Preferences
fn clone(&self) -> Preferences
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Preferences
impl RefUnwindSafe for Preferences
impl !Send for Preferences
impl !Sync for Preferences
impl Unpin for Preferences
impl UnsafeUnpin for Preferences
impl UnwindSafe for Preferences
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more