Macro const_str
Source macro_rules! const_str {
($string: expr) => { ... };
}
Expand description
Constantly constructs Str from the given string, failing compilation if the string is empty.
§Examples
Simple usage:
use non_empty_str::const_str;
let nekit = const_str!("nekit");
Compilation failure if the string is empty:
ⓘuse non_empty_str::const_str;
let empty = const_str!("");