This crate provides a derive macro implementing the if_empty functionality if the type has an is_empty
function.
```rust
struct Example { value: String, }
impl Example { fn isempty(&self) -> bool { self.value.isempty() } }
fn main() { let example = Example { value: String::new(), }; print!("Example '{}'", example.value); // Example ''
let not_empty_example = e.if_empty(Example {
value: "default val".to_string(),
});
print!("Example '{}'", not_empty_example.value);
// Example 'default val'
} ```