Expand description
Slices and vectors that are statically guaranteed to be not empty.
Modules§
- prelude
- The prelude imports for
not_empty. The intention is so you can includeuse not_empty::prelude::*and have easy access to this crate’s types and traits. - slice
- A dynamically-sized view into a contiguous sequence,
[T], that is not empty.
Macros§
- not_
empty_ vec allocorstd - Creates a
NonEmptyVeccontaining the arguments. - vec
allocorstd - An alias of
not_empty_vecifnot_empty::vecusage is preferred.
Structs§
- Empty
Error - An error thrown when the input collection is empty.
- NonEmpty
Slice - A slice that is guaranteed to not be empty.
- NonEmpty
Vec - A vector that is guaranteed to not be empty.
Traits§
- Iterator
Ext - Extends
Iteratorwith methods for collectingNonEmptyVecs as a stop-gap to retain a fallibleIterator::collectfunctionality.
Type Aliases§
- Slice
- An alias of
NonEmptySlice<T>ifnot_empty::Slice<T>usage is preferred. - Vec
allocorstd - An alias of
NonEmptyVec<T>ifnot_empty::Vec<T>usage is preferred.