Trait MaybeCountable

Source
pub trait MaybeCountable {
    // Provided methods
    fn count(&self) -> Option<usize> { ... }
    fn is_countable(&self) -> bool { ... }
    fn is_empty(&self) -> Option<bool> { ... }
    fn is_nonempty(&self) -> Option<bool> { ... }
}
Expand description

A trait for collections that may be countable.

Provided Methods§

Source

fn count(&self) -> Option<usize>

Returns the number of elements in the collection, if known.

Source

fn is_countable(&self) -> bool

Checks whether the collection is countable.

Source

fn is_empty(&self) -> Option<bool>

Checks whether the collection is empty, if known.

Source

fn is_nonempty(&self) -> Option<bool>

Checks whether the collection is nonempty, if known.

Implementors§