stefans-utils 0.12.0

A collection of useful Rust utility functions, types, and traits.
Documentation
1
2
3
4
5
6
7
8
9
10
11
pub trait WithLen {
    fn len(&self) -> usize;

    fn is_empty(&self) -> bool {
        self.len() == 0
    }

    fn not_empty(&self) -> bool {
        !self.is_empty()
    }
}