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 alloc
orstd
- Creates a
NonEmptyVec
containing the arguments. - vec
alloc
orstd
- An alias of
not_empty_vec
ifnot_empty::vec
usage 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
Iterator
with methods for collectingNonEmptyVec
s as a stop-gap to retain a fallibleIterator::collect
functionality.
Type Aliases§
- Slice
- An alias of
NonEmptySlice<T>
ifnot_empty::Slice<T>
usage is preferred. - Vec
alloc
orstd
- An alias of
NonEmptyVec<T>
ifnot_empty::Vec<T>
usage is preferred.