pub struct ManagementProfile {
pub version: u32,
pub updated_at: i64,
pub settings: HashMap<String, String>,
}Expand description
A point-in-time snapshot of administrator-forced configuration for this client.
settings maps dotted keys (e.g. "generator.password.length") to JSON-encoded
strings. A plain String is used (not serde_json::Value) because it has a UniFFI
representation. Callers parse on demand through get_as.
This is client configuration forced by an operating system’s Unified Endpoint Management (UEM/MDM) channel. It is not Vault Data and involves no cryptography.
Fields§
§version: u32Schema version. Bumped when the dotted-key namespace changes incompatibly.
updated_at: i64Unix timestamp (seconds) at which the host last refreshed the profile.
This field participates in equality, so two profiles carrying identical settings compare
unequal when the host re-read the source and re-stamped the timestamp. Do not use == to
detect whether the managed settings themselves changed; compare settings instead.
settings: HashMap<String, String>Dotted key to JSON-encoded value string.
Implementations§
Source§impl ManagementProfile
impl ManagementProfile
Sourcepub fn empty() -> Self
pub fn empty() -> Self
An empty profile, equivalent to “no admin overrides”. Every is_managed returns false.
Sourcepub fn is_managed(&self, key: &str) -> bool
pub fn is_managed(&self, key: &str) -> bool
Returns true if key is present. Presence implies the value is forced.
Sourcepub fn get(&self, key: &str) -> Option<String>
pub fn get(&self, key: &str) -> Option<String>
Returns the raw JSON-encoded string stored under key, if any.
Sourcepub fn get_as<T: DeserializeOwned>(
&self,
key: &str,
) -> Result<Option<T>, ManagedSettingsError>
pub fn get_as<T: DeserializeOwned>( &self, key: &str, ) -> Result<Option<T>, ManagedSettingsError>
Get and JSON-decode a value to T.
Trait Implementations§
Source§impl Clone for ManagementProfile
impl Clone for ManagementProfile
Source§fn clone(&self) -> ManagementProfile
fn clone(&self) -> ManagementProfile
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<UT> ConvertError<UT> for ManagementProfile
impl<UT> ConvertError<UT> for ManagementProfile
fn try_convert_unexpected_callback_error( e: UnexpectedUniFFICallbackError, ) -> Result<Self>
Source§impl Debug for ManagementProfile
impl Debug for ManagementProfile
Source§impl<'de> Deserialize<'de> for ManagementProfile
impl<'de> Deserialize<'de> for ManagementProfile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ManagementProfile
Source§impl<UT> FfiConverter<UT> for ManagementProfile
impl<UT> FfiConverter<UT> for ManagementProfile
Source§const TYPE_ID_META: MetadataBuffer
const TYPE_ID_META: MetadataBuffer
Source§type FfiType = RustBuffer
type FfiType = RustBuffer
Source§fn lower(v: Self) -> RustBuffer
fn lower(v: Self) -> RustBuffer
Source§fn try_lift(buf: RustBuffer) -> Result<Self>
fn try_lift(buf: RustBuffer) -> Result<Self>
Source§impl From<ManagementProfile> for JsValuewhere
ManagementProfile: Serialize,
impl From<ManagementProfile> for JsValuewhere
ManagementProfile: Serialize,
Source§fn from(value: ManagementProfile) -> Self
fn from(value: ManagementProfile) -> Self
Source§impl FromWasmAbi for ManagementProfilewhere
Self: DeserializeOwned,
impl FromWasmAbi for ManagementProfilewhere
Self: DeserializeOwned,
Source§impl IntoWasmAbi for &ManagementProfilewhere
ManagementProfile: Serialize,
impl IntoWasmAbi for &ManagementProfilewhere
ManagementProfile: Serialize,
Source§impl IntoWasmAbi for ManagementProfilewhere
ManagementProfile: Serialize,
impl IntoWasmAbi for ManagementProfilewhere
ManagementProfile: Serialize,
Source§impl<UT> Lift<UT> for ManagementProfile
impl<UT> Lift<UT> for ManagementProfile
Source§impl<UT> LiftRef<UT> for ManagementProfile
impl<UT> LiftRef<UT> for ManagementProfile
type LiftType = ManagementProfile
Source§impl<UT> LiftReturn<UT> for ManagementProfile
impl<UT> LiftReturn<UT> for ManagementProfile
Source§type ReturnType = <ManagementProfile as Lift<UT>>::FfiType
type ReturnType = <ManagementProfile as Lift<UT>>::FfiType
Source§fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
§fn lift_foreign_return(
ffi_return: Self::ReturnType,
call_status: RustCallStatus,
) -> Self
fn lift_foreign_return( ffi_return: Self::ReturnType, call_status: RustCallStatus, ) -> Self
§fn lift_error(_buf: RustBuffer) -> Self
fn lift_error(_buf: RustBuffer) -> Self
§fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
Source§impl<UT> Lower<UT> for ManagementProfile
impl<UT> Lower<UT> for ManagementProfile
Source§impl<UT> LowerError<UT> for ManagementProfile
impl<UT> LowerError<UT> for ManagementProfile
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Source§impl<UT> LowerReturn<UT> for ManagementProfile
impl<UT> LowerReturn<UT> for ManagementProfile
Source§type ReturnType = <ManagementProfile as Lower<UT>>::FfiType
type ReturnType = <ManagementProfile as Lower<UT>>::FfiType
Source§fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Source§impl OptionFromWasmAbi for ManagementProfilewhere
Self: DeserializeOwned,
impl OptionFromWasmAbi for ManagementProfilewhere
Self: DeserializeOwned,
Source§impl OptionIntoWasmAbi for ManagementProfilewhere
ManagementProfile: Serialize,
impl OptionIntoWasmAbi for ManagementProfilewhere
ManagementProfile: Serialize,
Source§impl PartialEq for ManagementProfile
impl PartialEq for ManagementProfile
Source§impl RefFromWasmAbi for ManagementProfilewhere
Self: DeserializeOwned,
impl RefFromWasmAbi for ManagementProfilewhere
Self: DeserializeOwned,
Source§type Abi = <JsType as RefFromWasmAbi>::Abi
type Abi = <JsType as RefFromWasmAbi>::Abi
Self are recovered from.Source§type Anchor = SelfOwner<ManagementProfile>
type Anchor = SelfOwner<ManagementProfile>
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.Source§impl Serialize for ManagementProfile
impl Serialize for ManagementProfile
impl StructuralPartialEq for ManagementProfile
Source§impl Tsify for ManagementProfile
impl Tsify for ManagementProfile
const DECL: &'static str = "/**\n * A point-in-time snapshot of administrator-forced configuration for this client.\n *\n * `settings` maps dotted keys (e.g. `\\\"generator.password.length\\\"`) to JSON-encoded\n * strings. A plain `String` is used (not `serde_json::Value`) because it has a UniFFI\n * representation. Callers parse on demand through [`get_as`](ManagementProfile::get_as).\n *\n * This is client configuration forced by an operating system\\\'s Unified Endpoint Management\n * (UEM/MDM) channel. It is not Vault Data and involves no cryptography.\n */\nexport interface ManagementProfile {\n /**\n * Schema version. Bumped when the dotted-key namespace changes incompatibly.\n */\n version: number;\n /**\n * Unix timestamp (seconds) at which the host last refreshed the profile.\n *\n * This field participates in equality, so two profiles carrying identical `settings` compare\n * unequal when the host re-read the source and re-stamped the timestamp. Do not use `==` to\n * detect whether the managed settings themselves changed; compare `settings` instead.\n */\n updatedAt: number;\n /**\n * Dotted key to JSON-encoded value string.\n */\n settings: Map<string, string>;\n}"
const SERIALIZATION_CONFIG: SerializationConfig
type JsType = JsType
fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
fn from_js<T>(js: T) -> Result<Self, Error>
Source§impl<UT> TypeId<UT> for ManagementProfile
impl<UT> TypeId<UT> for ManagementProfile
const TYPE_ID_META: MetadataBuffer
Source§impl VectorFromWasmAbi for ManagementProfilewhere
Self: DeserializeOwned,
impl VectorFromWasmAbi for ManagementProfilewhere
Self: DeserializeOwned,
type Abi = <JsType as VectorFromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]>
Source§impl VectorIntoWasmAbi for ManagementProfilewhere
ManagementProfile: Serialize,
impl VectorIntoWasmAbi for ManagementProfilewhere
ManagementProfile: Serialize,
type Abi = <JsType as VectorIntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[Self]>) -> Self::Abi
Source§impl WasmDescribe for ManagementProfile
impl WasmDescribe for ManagementProfile
Auto Trait Implementations§
impl Freeze for ManagementProfile
impl RefUnwindSafe for ManagementProfile
impl Send for ManagementProfile
impl Sync for ManagementProfile
impl Unpin for ManagementProfile
impl UnsafeUnpin for ManagementProfile
impl UnwindSafe for ManagementProfile
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
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§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 moreSource§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.