Trait if_empty::IfEmptyBorrowed[][src]

pub trait IfEmptyBorrowed {
    fn if_empty<'a>(&'a self, val: &'a Self) -> &'a Self;
}
Expand description

For checking IfEmpty on borrowed objects

Required methods

Return val if self is empty

Implementations on Foreign Types

Implementation of IfEmptyBorrowed for str

Returns input if str::is_empty() returns true. Otherwise self is returned.

Implementors