pub struct MasterPasswordPolicyData {
pub min_complexity: Option<i32>,
pub min_length: Option<i32>,
pub require_lower: Option<bool>,
pub require_upper: Option<bool>,
pub require_numbers: Option<bool>,
pub require_special: Option<bool>,
pub enforce_on_login: Option<bool>,
}Expand description
The complexity requirements an organization enforces on members’ master passwords.
This models the same information the server delivers two ways: as the
policy’s saved JSON data blob (parsed for enforcement) and as the typed
[MasterPasswordPolicyResponseModel] returned at login (bridged via
From).
Fields§
§min_complexity: Option<i32>The minimum complexity score required for the master password. Complexity is calculated based on password strength metrics.
min_length: Option<i32>The minimum length required for the master password.
require_lower: Option<bool>Whether the master password must contain at least one lowercase letter.
require_upper: Option<bool>Whether the master password must contain at least one uppercase letter.
require_numbers: Option<bool>Whether the master password must contain at least one numeric digit.
require_special: Option<bool>Whether the master password must contain at least one special character.
enforce_on_login: Option<bool>Whether this policy should be enforced when the user logs in. If true, the user will be required to update their master password if it doesn’t meet the policy requirements.
Trait Implementations§
Source§impl Clone for MasterPasswordPolicyData
impl Clone for MasterPasswordPolicyData
Source§fn clone(&self) -> MasterPasswordPolicyData
fn clone(&self) -> MasterPasswordPolicyData
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 MasterPasswordPolicyData
impl<UT> ConvertError<UT> for MasterPasswordPolicyData
fn try_convert_unexpected_callback_error( e: UnexpectedUniFFICallbackError, ) -> Result<Self>
Source§impl Debug for MasterPasswordPolicyData
impl Debug for MasterPasswordPolicyData
Source§impl Default for MasterPasswordPolicyData
impl Default for MasterPasswordPolicyData
Source§fn default() -> MasterPasswordPolicyData
fn default() -> MasterPasswordPolicyData
Source§impl<'de> Deserialize<'de> for MasterPasswordPolicyData
impl<'de> Deserialize<'de> for MasterPasswordPolicyData
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>,
Source§impl<UT> FfiConverter<UT> for MasterPasswordPolicyData
impl<UT> FfiConverter<UT> for MasterPasswordPolicyData
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<MasterPasswordPolicyResponseModel> for MasterPasswordPolicyData
impl From<MasterPasswordPolicyResponseModel> for MasterPasswordPolicyData
Source§impl FromWasm for MasterPasswordPolicyData
Available on crate feature wasm only.
impl FromWasm for MasterPasswordPolicyData
wasm only.Source§impl<UT> Lift<UT> for MasterPasswordPolicyData
impl<UT> Lift<UT> for MasterPasswordPolicyData
Source§impl<UT> LiftRef<UT> for MasterPasswordPolicyData
impl<UT> LiftRef<UT> for MasterPasswordPolicyData
Source§impl<UT> LiftReturn<UT> for MasterPasswordPolicyData
impl<UT> LiftReturn<UT> for MasterPasswordPolicyData
Source§type ReturnType = <MasterPasswordPolicyData as Lift<UT>>::FfiType
type ReturnType = <MasterPasswordPolicyData 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 MasterPasswordPolicyData
impl<UT> Lower<UT> for MasterPasswordPolicyData
Source§impl<UT> LowerError<UT> for MasterPasswordPolicyData
impl<UT> LowerError<UT> for MasterPasswordPolicyData
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Source§impl<UT> LowerReturn<UT> for MasterPasswordPolicyData
impl<UT> LowerReturn<UT> for MasterPasswordPolicyData
Source§type ReturnType = <MasterPasswordPolicyData as Lower<UT>>::FfiType
type ReturnType = <MasterPasswordPolicyData 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 PartialEq for MasterPasswordPolicyData
impl PartialEq for MasterPasswordPolicyData
Source§impl Serialize for MasterPasswordPolicyData
impl Serialize for MasterPasswordPolicyData
impl StructuralPartialEq for MasterPasswordPolicyData
Source§impl ToWasm for MasterPasswordPolicyData
Available on crate feature wasm only.
impl ToWasm for MasterPasswordPolicyData
wasm only.Source§impl Tsify for MasterPasswordPolicyData
impl Tsify for MasterPasswordPolicyData
const DECL: &'static str = "/**\n * The complexity requirements an organization enforces on members\' master\n * passwords.\n *\n * This models the same information the server delivers two ways: as the\n * policy\'s saved JSON `data` blob (parsed for enforcement) and as the typed\n * [`MasterPasswordPolicyResponseModel`] returned at login (bridged via\n * [`From`]).\n */\nexport interface MasterPasswordPolicyData {\n /**\n * The minimum complexity score required for the master password.\n * Complexity is calculated based on password strength metrics.\n */\n minComplexity?: number;\n /**\n * The minimum length required for the master password.\n */\n minLength?: number;\n /**\n * Whether the master password must contain at least one lowercase letter.\n */\n requireLower?: boolean;\n /**\n * Whether the master password must contain at least one uppercase letter.\n */\n requireUpper?: boolean;\n /**\n * Whether the master password must contain at least one numeric digit.\n */\n requireNumbers?: boolean;\n /**\n * Whether the master password must contain at least one special character.\n */\n requireSpecial?: boolean;\n /**\n * Whether this policy should be enforced when the user logs in.\n * If true, the user will be required to update their master password\n * if it doesn\'t meet the policy requirements.\n */\n enforceOnLogin?: boolean;\n}"
const SERIALIZATION_CONFIG: SerializationConfig
Source§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>
Source§impl<UT> TypeId<UT> for MasterPasswordPolicyData
impl<UT> TypeId<UT> for MasterPasswordPolicyData
const TYPE_ID_META: MetadataBuffer
Auto Trait Implementations§
impl Freeze for MasterPasswordPolicyData
impl RefUnwindSafe for MasterPasswordPolicyData
impl Send for MasterPasswordPolicyData
impl Sync for MasterPasswordPolicyData
impl Unpin for MasterPasswordPolicyData
impl UnsafeUnpin for MasterPasswordPolicyData
impl UnwindSafe for MasterPasswordPolicyData
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<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