wrapping 0.2.0

Wrapping slices and arrays
Documentation
  • Coverage
  • 100%
    3 out of 3 items documented3 out of 3 items with examples
  • Size
  • Source code size: 6.88 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.53 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ureeves

Docs Build Status

wrapping

Wrapping around for slices.

Implements a wrapper around slices that allows for indexing beyond the length of the slice, by taking the index always modulo the length.

Example

use wrapping::Wrapping;

let array: [&str; 1] = ["hello"];
let wrapping = Wrapping::from(&array[..]);

assert_eq!(wrapping[0], "hello");
assert_eq!(wrapping[1], "hello");