Crate nonempty_containers

Source
Expand description

Non-empty containers.

Non-emptiness is generally a very useful tool, when you need inherent guarantees in code but want to avoid repeatedly writing the same checks. This module provides non-empty versions of common container types, such as Vec.

Re-exports§

pub use ne_vec::NEVec;
pub use ne_set::NESet;
pub use ne_ordered_set::NEOrderedSet;

Modules§

ne_ordered_set
ne_set
A non-empty set type that guarantees at least one element is present. NESet has an interface similar to HashSet with additional methods to enforce the invariant. Get started with:
ne_vec
A non-empty vector type that guarantees at least one element is present. NEVec has an interface similar to Vec with additional methods to enforce the invariant. Get started with:

Macros§

neos
nes
nev
Creates a [NonEmptyVec] containing the arguments.