Type Alias TextName

Source
pub type TextName<'a> = ConstrainedText<Cow<'a, str>, NonEmpty>;
Expand description

A Cow<str> for a name that cannot be empty or all-whitespace.

It Derefs to &str.

Aliased Type§

pub struct TextName<'a>(/* private fields */);

Implementations§

Source§

impl<'a> TextName<'a>

Source

pub fn new_from_str<T: Into<Cow<'a, str>>>(text: T) -> Option<Self>