Struct PasswordGeneratorRequest
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.
Trait Implementations§
§impl Debug for PasswordGeneratorRequest
impl Debug for PasswordGeneratorRequest
§impl Default for PasswordGeneratorRequest
impl Default for PasswordGeneratorRequest
§fn default() -> PasswordGeneratorRequest
fn default() -> PasswordGeneratorRequest
§impl<'de> Deserialize<'de> for PasswordGeneratorRequest
impl<'de> Deserialize<'de> for PasswordGeneratorRequest
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PasswordGeneratorRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PasswordGeneratorRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl JsonSchema for PasswordGeneratorRequest
impl JsonSchema for PasswordGeneratorRequest
§fn schema_name() -> String
fn schema_name() -> String
§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
§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 more§impl Serialize for PasswordGeneratorRequest
impl Serialize for PasswordGeneratorRequest
§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,
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> 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