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, and hands its
cell to
[bitwarden_core::ClientBuilder::with_managed_profile] so the SDK reads the same profile.
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
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.
pub(crate) fn from_profile( profile: Arc<RwLock<Option<ManagementProfile>>>, ) -> Self
Sourcepub fn cell(&self) -> Arc<RwLock<Option<ManagementProfile>>> ⓘ
pub fn cell(&self) -> Arc<RwLock<Option<ManagementProfile>>> ⓘ
The shared profile cell, for handing to
[bitwarden_core::ClientBuilder::with_managed_profile] so a constructed SDK client reads
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.
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 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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for ManagedSettingsClient
impl Default for ManagedSettingsClient
Source§impl From<ManagedSettingsClient> for JsValue
impl From<ManagedSettingsClient> for JsValue
Source§fn from(value: ManagedSettingsClient) -> Self
fn from(value: ManagedSettingsClient) -> Self
Source§impl FromWasmAbi for ManagedSettingsClient
impl FromWasmAbi for ManagedSettingsClient
Source§impl IntoWasmAbi for ManagedSettingsClient
impl IntoWasmAbi for ManagedSettingsClient
Source§impl RefFromWasmAbi for ManagedSettingsClient
impl RefFromWasmAbi for ManagedSettingsClient
Source§type Anchor = RcRef<ManagedSettingsClient>
type Anchor = RcRef<ManagedSettingsClient>
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.impl SupportsConstructor for ManagedSettingsClient
impl SupportsInstanceProperty for ManagedSettingsClient
impl SupportsStaticProperty for ManagedSettingsClient
Source§impl VectorFromWasmAbi for ManagedSettingsClient
impl VectorFromWasmAbi for ManagedSettingsClient
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[ManagedSettingsClient]>
Source§impl VectorIntoWasmAbi for ManagedSettingsClient
impl VectorIntoWasmAbi for ManagedSettingsClient
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[ManagedSettingsClient]>) -> Self::Abi
Source§impl WasmDescribe for ManagedSettingsClient
impl WasmDescribe for ManagedSettingsClient
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
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> ⓘ
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> ⓘ
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> ⓘ
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,
impl<T> Read<Exclusive, BecauseExclusive> 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
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.