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

pub struct NonEmpty(pub String);

Require that the string not be empty.

Examples

assert_eq!(NonEmpty::from_str("Давай пойдём в Москву!"),
           Ok(NonEmpty("Давай пойдём в Москву!".to_string())));

assert!(NonEmpty::from_str("").is_err());

Trait Implementations

impl PartialEq<NonEmpty> for NonEmpty
[src]

impl Clone for NonEmpty
[src]

Performs copy-assignment from source. Read more

impl Ord for NonEmpty
[src]

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl Eq for NonEmpty
[src]

impl PartialOrd<NonEmpty> for NonEmpty
[src]

impl Debug for NonEmpty
[src]

impl FromStr for NonEmpty
[src]

The associated error which can be returned from parsing.

impl Hash for NonEmpty
[src]

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

impl Serialize for NonEmpty
[src]

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

impl<'v> FromFormValue<'v> for NonEmpty
[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

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 NonEmpty

impl Sync for NonEmpty

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