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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl<UT> ConvertError<UT> for ManagementProfile
impl<UT> ConvertError<UT> for ManagementProfile
fn try_convert_unexpected_callback_error( e: UnexpectedUniFFICallbackError, ) -> Result<ManagementProfile, Error>
§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 Eq for ManagementProfile
§impl<UT> FfiConverter<UT> for ManagementProfile
impl<UT> FfiConverter<UT> for ManagementProfile
§const TYPE_ID_META: MetadataBuffer
const TYPE_ID_META: MetadataBuffer
§type FfiType = RustBuffer
type FfiType = RustBuffer
§fn lower(v: ManagementProfile) -> RustBuffer
fn lower(v: ManagementProfile) -> RustBuffer
§fn try_lift(buf: RustBuffer) -> Result<ManagementProfile, Error>
fn try_lift(buf: RustBuffer) -> Result<ManagementProfile, Error>
§impl FromWasmAbi for ManagementProfilewhere
ManagementProfile: DeserializeOwned,
impl FromWasmAbi for ManagementProfilewhere
ManagementProfile: DeserializeOwned,
§type Abi = <JsType as FromWasmAbi>::Abi
type Abi = <JsType as FromWasmAbi>::Abi
§unsafe fn from_abi(
js: <ManagementProfile as FromWasmAbi>::Abi,
) -> ManagementProfile
unsafe fn from_abi( js: <ManagementProfile as FromWasmAbi>::Abi, ) -> ManagementProfile
§impl IntoWasmAbi for &ManagementProfilewhere
ManagementProfile: Serialize,
impl IntoWasmAbi for &ManagementProfilewhere
ManagementProfile: Serialize,
§type Abi = <JsType as IntoWasmAbi>::Abi
type Abi = <JsType as IntoWasmAbi>::Abi
§fn into_abi(self) -> <&ManagementProfile as IntoWasmAbi>::Abi
fn into_abi(self) -> <&ManagementProfile as IntoWasmAbi>::Abi
self into Self::Abi so that it can be sent across the wasm
ABI boundary.§impl IntoWasmAbi for ManagementProfilewhere
ManagementProfile: Serialize,
impl IntoWasmAbi for ManagementProfilewhere
ManagementProfile: Serialize,
§type Abi = <JsType as IntoWasmAbi>::Abi
type Abi = <JsType as IntoWasmAbi>::Abi
§fn into_abi(self) -> <ManagementProfile as IntoWasmAbi>::Abi
fn into_abi(self) -> <ManagementProfile as IntoWasmAbi>::Abi
self into Self::Abi so that it can be sent across the wasm
ABI boundary.§impl<UT> Lift<UT> for ManagementProfile
impl<UT> Lift<UT> for ManagementProfile
type FfiType = <ManagementProfile as FfiConverter<UT>>::FfiType
fn try_lift( v: <ManagementProfile as Lift<UT>>::FfiType, ) -> Result<ManagementProfile, Error>
fn try_read(buf: &mut &[u8]) -> Result<ManagementProfile, Error>
§fn try_lift_from_rust_buffer(v: RustBuffer) -> Result<Self, Error>
fn try_lift_from_rust_buffer(v: RustBuffer) -> Result<Self, Error>
§impl<UT> LiftRef<UT> for ManagementProfile
impl<UT> LiftRef<UT> for ManagementProfile
type LiftType = ManagementProfile
§impl<UT> LiftReturn<UT> for ManagementProfile
impl<UT> LiftReturn<UT> for ManagementProfile
§type ReturnType = <ManagementProfile as Lift<UT>>::FfiType
type ReturnType = <ManagementProfile as Lift<UT>>::FfiType
§fn try_lift_successful_return(
v: <ManagementProfile as LiftReturn<UT>>::ReturnType,
) -> Result<ManagementProfile, Error>
fn try_lift_successful_return( v: <ManagementProfile as LiftReturn<UT>>::ReturnType, ) -> Result<ManagementProfile, Error>
§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
§impl<UT> Lower<UT> for ManagementProfile
impl<UT> Lower<UT> for ManagementProfile
type FfiType = <ManagementProfile as FfiConverter<UT>>::FfiType
fn lower(obj: ManagementProfile) -> <ManagementProfile as Lower<UT>>::FfiType
fn write(obj: ManagementProfile, buf: &mut Vec<u8>)
§fn lower_into_rust_buffer(obj: Self) -> RustBuffer
fn lower_into_rust_buffer(obj: Self) -> RustBuffer
§impl<UT> LowerError<UT> for ManagementProfile
impl<UT> LowerError<UT> for ManagementProfile
§fn lower_error(obj: ManagementProfile) -> RustBuffer
fn lower_error(obj: ManagementProfile) -> RustBuffer
§impl<UT> LowerReturn<UT> for ManagementProfile
impl<UT> LowerReturn<UT> for ManagementProfile
§type ReturnType = <ManagementProfile as Lower<UT>>::FfiType
type ReturnType = <ManagementProfile as Lower<UT>>::FfiType
§fn lower_return(
v: ManagementProfile,
) -> Result<<ManagementProfile as LowerReturn<UT>>::ReturnType, RustCallError>
fn lower_return( v: ManagementProfile, ) -> Result<<ManagementProfile as LowerReturn<UT>>::ReturnType, RustCallError>
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
§impl OptionFromWasmAbi for ManagementProfilewhere
ManagementProfile: DeserializeOwned,
impl OptionFromWasmAbi for ManagementProfilewhere
ManagementProfile: DeserializeOwned,
§fn is_none(js: &<ManagementProfile as FromWasmAbi>::Abi) -> bool
fn is_none(js: &<ManagementProfile as FromWasmAbi>::Abi) -> bool
None, and otherwise it will be passed to
FromWasmAbi.§impl OptionIntoWasmAbi for ManagementProfilewhere
ManagementProfile: Serialize,
impl OptionIntoWasmAbi for ManagementProfilewhere
ManagementProfile: Serialize,
§fn none() -> <ManagementProfile as IntoWasmAbi>::Abi
fn none() -> <ManagementProfile as IntoWasmAbi>::Abi
None branch of this option. Read more§impl PartialEq for ManagementProfile
impl PartialEq for ManagementProfile
§impl RefFromWasmAbi for ManagementProfilewhere
ManagementProfile: DeserializeOwned,
impl RefFromWasmAbi for ManagementProfilewhere
ManagementProfile: DeserializeOwned,
§type Abi = <JsType as RefFromWasmAbi>::Abi
type Abi = <JsType as RefFromWasmAbi>::Abi
Self are recovered from.§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.§unsafe fn ref_from_abi(
js: <ManagementProfile as RefFromWasmAbi>::Abi,
) -> <ManagementProfile as RefFromWasmAbi>::Anchor
unsafe fn ref_from_abi( js: <ManagementProfile as RefFromWasmAbi>::Abi, ) -> <ManagementProfile as RefFromWasmAbi>::Anchor
§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 StructuralPartialEq for ManagementProfile
§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>
§impl<UT> TypeId<UT> for ManagementProfile
impl<UT> TypeId<UT> for ManagementProfile
const TYPE_ID_META: MetadataBuffer
§impl VectorFromWasmAbi for ManagementProfilewhere
ManagementProfile: DeserializeOwned,
impl VectorFromWasmAbi for ManagementProfilewhere
ManagementProfile: DeserializeOwned,
type Abi = <JsType as VectorFromWasmAbi>::Abi
unsafe fn vector_from_abi( js: <ManagementProfile as VectorFromWasmAbi>::Abi, ) -> Box<[ManagementProfile]>
§impl VectorIntoWasmAbi for ManagementProfilewhere
ManagementProfile: Serialize,
impl VectorIntoWasmAbi for ManagementProfilewhere
ManagementProfile: Serialize,
type Abi = <JsType as VectorIntoWasmAbi>::Abi
fn vector_into_abi( vector: Box<[ManagementProfile]>, ) -> <ManagementProfile as VectorIntoWasmAbi>::Abi
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§
§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> 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<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<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.