pub struct ManagedSettingsClient {
profile: Arc<RwLock<Option<ManagementProfile>>>,
}Expand description
Handle to the host system’s Unified Endpoint Management profile.
The host application constructs one of these at boot and pushes profiles into it. Clones share the underlying profile, so an update pushed through one clone is observed by all of them.
Fields§
§profile: Arc<RwLock<Option<ManagementProfile>>>Implementations§
Source§impl ManagedSettingsClient
impl ManagedSettingsClient
Sourcepub fn new() -> Self
pub fn new() -> Self
Fresh handle with no active profile. The host should call this once at boot.
Sourcepub fn cell(&self) -> Arc<RwLock<Option<ManagementProfile>>>
pub fn cell(&self) -> Arc<RwLock<Option<ManagementProfile>>>
The shared profile cell, so a constructed SDK client can read the same profile the host pushes into this handle.
Sourcepub fn current_profile(&self) -> Option<ManagementProfile>
pub fn current_profile(&self) -> Option<ManagementProfile>
The active profile, or None when the host has not pushed one.
Sourcepub fn update_profile(&self, profile: Option<ManagementProfile>)
pub fn update_profile(&self, profile: Option<ManagementProfile>)
Replace the active profile. Clear the profile with None.
Sourcepub fn is_managed(&self, key: String) -> bool
pub fn is_managed(&self, key: String) -> bool
Returns true if key is present in the active profile.
Trait Implementations§
Source§impl Clone for ManagedSettingsClient
impl Clone for ManagedSettingsClient
Source§fn clone(&self) -> ManagedSettingsClient
fn clone(&self) -> ManagedSettingsClient
Returns a duplicate of the value. Read more
1.0.0 · 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 ManagedSettingsClient
impl RefUnwindSafe for ManagedSettingsClient
impl Send for ManagedSettingsClient
impl Sync for ManagedSettingsClient
impl Unpin for ManagedSettingsClient
impl UnsafeUnpin for ManagedSettingsClient
impl UnwindSafe for ManagedSettingsClient
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