pub struct PasswordGeneratorRequest {
pub lowercase: bool,
pub uppercase: bool,
pub numbers: bool,
pub special: bool,
pub length: u8,
pub avoid_ambiguous: bool,
pub min_lowercase: Option<u8>,
pub min_uppercase: Option<u8>,
pub min_number: Option<u8>,
pub min_special: Option<u8>,
}
Expand description
Password generator request options.
Fields§
§lowercase: bool
Include lowercase characters (a-z).
uppercase: bool
Include uppercase characters (A-Z).
numbers: bool
Include numbers (0-9).
special: bool
Include special characters: ! @ # $ % ^ & *
length: u8
The length of the generated password. Note that the password length must be greater than the sum of all the minimums.
avoid_ambiguous: bool
When set to true, the generated password will not contain ambiguous characters. The ambiguous characters are: I, O, l, 0, 1
min_lowercase: Option<u8>
The minimum number of lowercase characters in the generated password. When set, the value must be between 1 and 9. This value is ignored if lowercase is false.
min_uppercase: Option<u8>
The minimum number of uppercase characters in the generated password. When set, the value must be between 1 and 9. This value is ignored if uppercase is false.
min_number: Option<u8>
The minimum number of numbers in the generated password. When set, the value must be between 1 and 9. This value is ignored if numbers is false.
min_special: Option<u8>
The minimum number of special characters in the generated password. When set, the value must be between 1 and 9. This value is ignored if special is false.
Implementations§
Source§impl PasswordGeneratorRequest
impl PasswordGeneratorRequest
Sourcefn validate_options(self) -> Result<PasswordGeneratorOptions, PasswordError>
fn validate_options(self) -> Result<PasswordGeneratorOptions, PasswordError>
Validates the request and returns an immutable struct with valid options to use with the password generator.
Trait Implementations§
Source§impl<UT> ConvertError<UT> for PasswordGeneratorRequest
impl<UT> ConvertError<UT> for PasswordGeneratorRequest
fn try_convert_unexpected_callback_error( e: UnexpectedUniFFICallbackError, ) -> Result<Self>
Source§impl Debug for PasswordGeneratorRequest
impl Debug for PasswordGeneratorRequest
Source§impl Default for PasswordGeneratorRequest
impl Default for PasswordGeneratorRequest
Source§impl<'de> Deserialize<'de> for PasswordGeneratorRequest
impl<'de> Deserialize<'de> for PasswordGeneratorRequest
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 PasswordGeneratorRequest
impl<UT> FfiConverter<UT> for PasswordGeneratorRequest
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 JsonSchema for PasswordGeneratorRequest
impl JsonSchema for PasswordGeneratorRequest
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read moreSource§impl<UT> Lift<UT> for PasswordGeneratorRequest
impl<UT> Lift<UT> for PasswordGeneratorRequest
Source§impl<UT> LiftRef<UT> for PasswordGeneratorRequest
impl<UT> LiftRef<UT> for PasswordGeneratorRequest
Source§impl<UT> LiftReturn<UT> for PasswordGeneratorRequest
impl<UT> LiftReturn<UT> for PasswordGeneratorRequest
Source§type ReturnType = <PasswordGeneratorRequest as Lift<UT>>::FfiType
type ReturnType = <PasswordGeneratorRequest 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 PasswordGeneratorRequest
impl<UT> Lower<UT> for PasswordGeneratorRequest
Source§impl<UT> LowerError<UT> for PasswordGeneratorRequest
impl<UT> LowerError<UT> for PasswordGeneratorRequest
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Source§impl<UT> LowerReturn<UT> for PasswordGeneratorRequest
impl<UT> LowerReturn<UT> for PasswordGeneratorRequest
Source§type ReturnType = <PasswordGeneratorRequest as Lower<UT>>::FfiType
type ReturnType = <PasswordGeneratorRequest 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 Serialize for PasswordGeneratorRequest
impl Serialize for PasswordGeneratorRequest
Source§impl<UT> TypeId<UT> for PasswordGeneratorRequest
impl<UT> TypeId<UT> for PasswordGeneratorRequest
const TYPE_ID_META: MetadataBuffer = _
Auto Trait Implementations§
impl Freeze for PasswordGeneratorRequest
impl RefUnwindSafe for PasswordGeneratorRequest
impl Send for PasswordGeneratorRequest
impl Sync for PasswordGeneratorRequest
impl Unpin for PasswordGeneratorRequest
impl UnwindSafe for PasswordGeneratorRequest
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
§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>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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