Struct ManagementProfile
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§
§impl ManagementProfile
impl ManagementProfile
pub fn empty() -> ManagementProfile
pub fn empty() -> ManagementProfile
An empty profile, equivalent to “no admin overrides”. Every is_managed returns false.
pub 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.
pub 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.
pub fn get_as<T>(&self, key: &str) -> Result<Option<T>, ManagedSettingsError>where
T: DeserializeOwned,
pub fn get_as<T>(&self, key: &str) -> Result<Option<T>, ManagedSettingsError>where
T: DeserializeOwned,
Get and JSON-decode a value to T.
Trait Implementations§
§impl Clone for ManagementProfile
impl Clone for ManagementProfile
§fn clone(&self) -> ManagementProfile
fn clone(&self) -> ManagementProfile
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for ManagementProfile
impl Debug for ManagementProfile
§impl<'de> Deserialize<'de> for ManagementProfile
impl<'de> Deserialize<'de> for ManagementProfile
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ManagementProfile, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ManagementProfile, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl PartialEq for ManagementProfile
impl PartialEq for ManagementProfile
§impl Serialize for ManagementProfile
impl Serialize for ManagementProfile
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for ManagementProfile
impl StructuralPartialEq 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<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.