porous 0.1.0

Non-contigous range implementation
Documentation
  • Coverage
  • 20%
    1 out of 5 items documented1 out of 5 items with examples
  • Size
  • Source code size: 6 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.5 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 13s Average build duration of successful builds.
  • all releases: 13s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • voidentente

Nightly Only

step_trait is required for marking the generic Item as iterable. See the requirement for RangeInclusive::into_iter.

About

 1 2 3 4 5 6 7 8         1 2 3 4 5 6 7 8
[---------------] - 4 = [-----] [-------]

The main structure this crate provides is PorousRange, which abstracts over an indefinite amount of ranges (i.e. requires allocation) to simulate one non-contigous one.

PorousRange accepts any inner generic item that is num_traits::One, core::iter::Step, core::marker::Copy, core::ops::Add, and core::ops::Sub. These requirements are fulfilled by every built-in integer.

An item is never contained in more than one inner range and can be removed, if it is contained, so that range is removed and up to two new ranges are pushed so that PorousRangen \ PorousRangen + 1 = { item }.

Features

  • serde: Implement Serialize and Deserialize on PorousRange