pub enum IdenticationRequirement {
Nickname {
spaces: bool,
upper_registry: bool,
characters: bool,
},
Email {
exclude_email_domains: Vec<String>,
},
}Expand description
Identication requirement.
This is how you should require proper identication from user as a application backend’s administrator.
Variants§
Nickname
Simple nickname identication.
You can specify:
- Allowance of spaces (e.g.,
pimple crawler) - Allowance of upper-registry letters (e.g.,
HelloKitty1983) - Allowance of characters except
_&-(e.g.,MainForce **ELIGE**)
Email identication.
You can specify email domains that you want to exclude (for example, that domains which supports temporary registration).
Implementations§
Source§impl IdenticationRequirement
impl IdenticationRequirement
Sourcepub fn simple_nickname() -> Self
pub fn simple_nickname() -> Self
Creates a simple nickname requirement.
Sourcepub fn nickname_with_opts(
spaces: bool,
upper_registry: bool,
characters: bool,
) -> Self
pub fn nickname_with_opts( spaces: bool, upper_registry: bool, characters: bool, ) -> Self
Creates a nickname requirement with options.
Sourcepub fn simple_email() -> Self
pub fn simple_email() -> Self
Creates a simple email requirement.
Sourcepub fn email_with_opts(exclude_email_domains: &[impl ToString]) -> Self
pub fn email_with_opts(exclude_email_domains: &[impl ToString]) -> Self
Creates an email requirement with options.
Trait Implementations§
Source§impl Clone for IdenticationRequirement
impl Clone for IdenticationRequirement
Source§fn clone(&self) -> IdenticationRequirement
fn clone(&self) -> IdenticationRequirement
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IdenticationRequirement
impl Debug for IdenticationRequirement
Source§impl<'de> Deserialize<'de> for IdenticationRequirement
impl<'de> Deserialize<'de> for IdenticationRequirement
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for IdenticationRequirement
Source§impl Hash for IdenticationRequirement
impl Hash for IdenticationRequirement
Source§impl PartialEq for IdenticationRequirement
impl PartialEq for IdenticationRequirement
Source§fn eq(&self, other: &IdenticationRequirement) -> bool
fn eq(&self, other: &IdenticationRequirement) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for IdenticationRequirement
impl Serialize for IdenticationRequirement
impl StructuralPartialEq for IdenticationRequirement
Source§impl ToSchema for IdenticationRequirement
impl ToSchema for IdenticationRequirement
Auto Trait Implementations§
impl Freeze for IdenticationRequirement
impl RefUnwindSafe for IdenticationRequirement
impl Send for IdenticationRequirement
impl Sync for IdenticationRequirement
impl Unpin for IdenticationRequirement
impl UnsafeUnpin for IdenticationRequirement
impl UnwindSafe for IdenticationRequirement
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.