copy-range 0.1.1

core::ops::Range et al, but Copy and IntoIterator
Documentation
  • Coverage
  • 80%
    20 out of 25 items documented0 out of 16 items with examples
  • Size
  • Source code size: 14.1 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4.53 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • zachs18/copy-range
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • zachs18

copy_range

This 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.