Struct ManagedSettingsClient
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§
§impl ManagedSettingsClient
Methods whose signatures cannot cross an FFI boundary, so they stay off the binding surface.
impl ManagedSettingsClient
Methods whose signatures cannot cross an FFI boundary, so they stay off the binding surface.
§impl ManagedSettingsClient
impl ManagedSettingsClient
pub fn new() -> ManagedSettingsClient
pub fn new() -> ManagedSettingsClient
Fresh handle with no active profile. The host should call this once at boot.
pub fn update_profile(&self, profile: Option<ManagementProfile>)
pub fn update_profile(&self, profile: Option<ManagementProfile>)
Replace the active profile. Clear the profile with None.
pub 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§
§impl Clone for ManagedSettingsClient
impl Clone for ManagedSettingsClient
§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 more§impl Default for ManagedSettingsClient
impl Default for ManagedSettingsClient
§fn default() -> ManagedSettingsClient
fn default() -> ManagedSettingsClient
Returns the “default value” for a type. Read more
§impl From<ManagedSettingsClient> for JsValue
impl From<ManagedSettingsClient> for JsValue
§fn from(value: ManagedSettingsClient) -> JsValue
fn from(value: ManagedSettingsClient) -> JsValue
Converts to this type from the input type.
§impl FromWasmAbi for ManagedSettingsClient
impl FromWasmAbi for ManagedSettingsClient
§impl IntoWasmAbi for ManagedSettingsClient
impl IntoWasmAbi for ManagedSettingsClient
§impl LongRefFromWasmAbi for ManagedSettingsClient
impl LongRefFromWasmAbi for ManagedSettingsClient
§type Anchor = RcRef<ManagedSettingsClient>
type Anchor = RcRef<ManagedSettingsClient>
Same as
RefFromWasmAbi::Anchor§unsafe fn long_ref_from_abi(
js: <ManagedSettingsClient as LongRefFromWasmAbi>::Abi,
) -> <ManagedSettingsClient as LongRefFromWasmAbi>::Anchor
unsafe fn long_ref_from_abi( js: <ManagedSettingsClient as LongRefFromWasmAbi>::Abi, ) -> <ManagedSettingsClient as LongRefFromWasmAbi>::Anchor
Same as
RefFromWasmAbi::ref_from_abi§impl OptionFromWasmAbi for ManagedSettingsClient
impl OptionFromWasmAbi for ManagedSettingsClient
§fn is_none(abi: &<ManagedSettingsClient as FromWasmAbi>::Abi) -> bool
fn is_none(abi: &<ManagedSettingsClient as FromWasmAbi>::Abi) -> bool
Tests whether the argument is a “none” instance. If so it will be
deserialized as
None, and otherwise it will be passed to
FromWasmAbi.§impl OptionIntoWasmAbi for ManagedSettingsClient
impl OptionIntoWasmAbi for ManagedSettingsClient
§fn none() -> <ManagedSettingsClient as IntoWasmAbi>::Abi
fn none() -> <ManagedSettingsClient as IntoWasmAbi>::Abi
Returns an ABI instance indicating “none”, which JS will interpret as
the
None branch of this option. Read more§impl RefFromWasmAbi for ManagedSettingsClient
impl RefFromWasmAbi for ManagedSettingsClient
§type Anchor = RcRef<ManagedSettingsClient>
type Anchor = RcRef<ManagedSettingsClient>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.§unsafe fn ref_from_abi(
js: <ManagedSettingsClient as RefFromWasmAbi>::Abi,
) -> <ManagedSettingsClient as RefFromWasmAbi>::Anchor
unsafe fn ref_from_abi( js: <ManagedSettingsClient as RefFromWasmAbi>::Abi, ) -> <ManagedSettingsClient as RefFromWasmAbi>::Anchor
§impl RefMutFromWasmAbi for ManagedSettingsClient
impl RefMutFromWasmAbi for ManagedSettingsClient
§type Anchor = RcRefMut<ManagedSettingsClient>
type Anchor = RcRefMut<ManagedSettingsClient>
Same as
RefFromWasmAbi::Anchor§unsafe fn ref_mut_from_abi(
js: <ManagedSettingsClient as RefMutFromWasmAbi>::Abi,
) -> <ManagedSettingsClient as RefMutFromWasmAbi>::Anchor
unsafe fn ref_mut_from_abi( js: <ManagedSettingsClient as RefMutFromWasmAbi>::Abi, ) -> <ManagedSettingsClient as RefMutFromWasmAbi>::Anchor
Same as
RefFromWasmAbi::ref_from_abi§impl TryFromJsValue for ManagedSettingsClient
impl TryFromJsValue for ManagedSettingsClient
§fn try_from_js_value(value: JsValue) -> Result<ManagedSettingsClient, JsValue>
fn try_from_js_value(value: JsValue) -> Result<ManagedSettingsClient, JsValue>
Performs the conversion.
§fn try_from_js_value_ref(value: &JsValue) -> Option<ManagedSettingsClient>
fn try_from_js_value_ref(value: &JsValue) -> Option<ManagedSettingsClient>
Performs the conversion.
§impl VectorFromWasmAbi for ManagedSettingsClient
impl VectorFromWasmAbi for ManagedSettingsClient
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi( js: <ManagedSettingsClient as VectorFromWasmAbi>::Abi, ) -> Box<[ManagedSettingsClient]>
§impl VectorIntoWasmAbi for ManagedSettingsClient
impl VectorIntoWasmAbi for ManagedSettingsClient
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi( vector: Box<[ManagedSettingsClient]>, ) -> <ManagedSettingsClient as VectorIntoWasmAbi>::Abi
Auto 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§
§impl<T> AnySync for T
impl<T> AnySync for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.