Crate not_empty

Source
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 include use 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_vecalloc or std
Creates a NonEmptyVec containing the arguments.
vecalloc or std
An alias of not_empty_vec if not_empty::vec usage is preferred.

Structs§

EmptyError
An error thrown when the input collection is empty.
NonEmptySlice
A slice that is guaranteed to not be empty.
NonEmptyVec
A vector that is guaranteed to not be empty.

Traits§

IteratorExt
Extends Iterator with methods for collecting NonEmptyVecs as a stop-gap to retain a fallible Iterator::collect functionality.

Type Aliases§

Slice
An alias of NonEmptySlice<T> if not_empty::Slice<T> usage is preferred.
Vecalloc or std
An alias of NonEmptyVec<T> if not_empty::Vec<T> usage is preferred.