[][src]Struct sudoku_backend::ops::constraints::EMail

pub struct EMail(pub String);

Weakly validate the string to be roughly e-mail-shaped.

Examples

assert_eq!(EMail::from_str("nabijaczleweli@gmail.com"),
           Ok(EMail("nabijaczleweli@gmail.com".to_string())));

assert!(EMail::from_str("Давай пойдём в Москву!").is_err());

Trait Implementations

impl PartialEq<EMail> for EMail
[src]

impl Clone for EMail
[src]

Performs copy-assignment from source. Read more

impl Ord for EMail
[src]

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl Eq for EMail
[src]

impl PartialOrd<EMail> for EMail
[src]

impl Debug for EMail
[src]

impl FromStr for EMail
[src]

The associated error which can be returned from parsing.

impl Hash for EMail
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Serialize for EMail
[src]

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

impl<'v> FromFormValue<'v> for EMail
[src]

The associated error which can be returned from parsing. It is a good idea to have the return type be or contain an &'v str so that the unparseable string can be examined after a bad parse. Read more

Any deeper kind of validation is either too complex or too bad to be reliable.

This, while not providing much guarantee, at least enforces something resemblant of an e-mail address.

Returns a default value to be used when the form field does not exist. If this returns None, then the field is required. Otherwise, this should return Some(default_value). The default implementation simply returns None. Read more

Auto Trait Implementations

impl Send for EMail

impl Sync for EMail

Blanket Implementations

impl<T> From for T
[src]

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

impl<T> Typeable for T where
    T: Any
[src]

Get the TypeId of this object.

impl<T> IntoSql for T
[src]

Convert self to an expression for Diesel's query builder. Read more

Convert &self to an expression for Diesel's query builder. Read more