macro_rules! assert_not_email_address {
($a:expr $(,)?) => { ... };
($a:expr, $($message:tt)+) => { ... };
}Expand description
Assert expression is possibly not an email address.
-
If true, return
(). -
Otherwise, call
panic!with a message and the values of the expressions with their debug representations.
§Examples
use assertables::*;
let a = "hello*example.com";
assert_not_email_address!(a);
// This will panic
let a = "hello@example.com";
assert_not_email_address!(a);
// assertion failed: `assert_not_email_address!(a)`
// https://docs.rs/assertables/…/assertables/macro.assert_not_email_address.html
// Email address has local part with valid length 1..64, then an '@' sign, then a domain part with valid length 1..255.
// a label: `a`,
// a debug: `\"hello@example.com\"`,
// a: `hello@example.com`,
// local part length: 5,
// domain part length: 11",