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, 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§
§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 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.
pub 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.
§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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Default for ManagedSettingsClient
impl Default for ManagedSettingsClient
§fn default() -> ManagedSettingsClient
fn default() -> ManagedSettingsClient
§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>
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
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
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
None branch of this option. Read more§impl RefFromWasmAbi for ManagedSettingsClient
impl RefFromWasmAbi for ManagedSettingsClient
§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.§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>
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
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>
§fn try_from_js_value_ref(value: &JsValue) -> Option<ManagedSettingsClient>
fn try_from_js_value_ref(value: &JsValue) -> Option<ManagedSettingsClient>
§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
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.