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 FromWasm for ManagementProfile
Available on crate feature wasm only.
impl FromWasm for ManagementProfile
wasm only.§type Wire = Ts<ManagementProfile>
type Wire = Ts<ManagementProfile>
§fn from_wire(
wire: <ManagementProfile as FromWasm>::Wire,
) -> Result<ManagementProfile, WireError>
fn from_wire( wire: <ManagementProfile as FromWasm>::Wire, ) -> Result<ManagementProfile, WireError>
§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 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 StructuralPartialEq for ManagementProfile
§impl ToWasm for ManagementProfile
Available on crate feature wasm only.
impl ToWasm for ManagementProfile
wasm only.§type Wire = Ts<ManagementProfile>
type Wire = Ts<ManagementProfile>
§fn to_wire(self) -> Result<<ManagementProfile as ToWasm>::Wire, WireError>
fn to_wire(self) -> Result<<ManagementProfile as ToWasm>::Wire, WireError>
§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
type JsType = JsType
#[wasm_bindgen] extern "C" { .. }.
[Ts<T>] is #[repr(transparent)] over this and passes it across the
ABI as a plain JS handle, which any other representation would break.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
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<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