[][src]Struct interledger_service::Username

pub struct Username(_);

Usernames can be unicode and must be between 2 and 32 characters.

This type applies the following checks/transformations to usernames to ensure uniqueness:

  1. NFKC Normalization
  2. Checks the string is 2-32 word characters only (no special characters except _)
  3. Uses case folding to convert to lowercase in a language-aware manner

Trait Implementations

impl AsRef<str> for Username[src]

impl Clone for Username[src]

impl Eq for Username[src]

impl Ord for Username[src]

impl PartialEq<Username> for Username[src]

impl PartialOrd<Username> for Username[src]

impl Display for Username[src]

impl Debug for Username[src]

impl<'_> TryFrom<&'_ str> for Username[src]

type Error = String

The type returned in the event of a conversion error.

impl FromStr for Username[src]

type Err = String

The associated error which can be returned from parsing.

impl Deref for Username[src]

type Target = str

The resulting type after dereferencing.

impl Serialize for Username[src]

impl<'de> Deserialize<'de> for Username[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]