Trait CheckEmpty

Source
pub trait CheckEmpty: Default + Clone {
    // Required method
    fn is_empty(&self) -> bool;
}
Available on crate feature unstable only.
Expand description

The CheckEmpty trait allows to check if a collection is empty.

Required Methods§

Source

fn is_empty(&self) -> bool

Returns true if the collection contains no elements.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<K: Clone, V: Clone> CheckEmpty for BTreeMap<K, V>

Source§

fn is_empty(&self) -> bool

Source§

impl<T: Clone> CheckEmpty for Vec<T>

Source§

fn is_empty(&self) -> bool

Implementors§