| Crates.io | copy-range |
| lib.rs | copy-range |
| version | 0.1.1 |
| created_at | 2023-09-02 23:06:39.079868+00 |
| updated_at | 2023-09-29 18:33:25.05354+00 |
| description | core::ops::Range et al, but Copy and IntoIterator |
| homepage | |
| repository | https://github.com/zachs18/copy-range |
| max_upload_size | |
| id | 961949 |
| size | 14,433 |
copy_rangeThis crate provides three structs: CopyRange, CopyRangeFrom, and
CopyRangeInclusive.
They are similar to core::ops's Range, RangeFrom, and
RangeInclusive, respectively, except they implement Copy if their
element type implements Copy, and they implement IntoIterator instead of
Iterator.
They are freely convertible to and from their core::ops counterparts (with
a note about RangeInclusive), and they
implement most of the same (non-iterator-related) traits, notably
RangeBounds.
Ranges of usize are additionally usable as the Index parameter for
arrays, slices, string slices and
(with the "alloc" feature enabled) Vec and
String.