Trait if_empty::IfEmpty [−][src]
pub trait IfEmpty { fn if_empty(self, val: Self) -> Self; }
Expand description
For checking IfEmpty on value semantics
Required methods
Implementations on Foreign Types
Implementation of IfEmpty
for String
Returns input
if String::is_empty()
returns true.
Otherwise self
is returned.
Implementation of IfEmpty
for OsString
Returns input
if OsString::is_empty()
returns true.
Otherwise self
is returned.