mileage 0.1.0

Enjoy the efficient char range!
docs.rs failed to build mileage-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: mileage-0.1.1

mileage

Enjoy the efficient char range! Also provided are ways of working with noncontinuous sets of unicode codepoints as well as mapping unicode codepoints to values.

  • CharRange is a simple range of codepoints, effectively std::ops::RangeInclusive<char>.
  • CharSet is a set of codepoints handled as a sorted vector of compact ranges.
  • CharTrie is a static set of codepoints optimized for wide codepoint coverage.
  • CharMap is a mapping from compact ranges of codepoints to values.

Features

  • set: Adds the CharSet type.
  • trie: Adds the CharTrie type.
  • map: Adds the CharMap reference type.
  • owned-set: Adds the CharSetBuf type.
  • new-trie: Adds code generation support for CharTries.
  • par-iter: Adds implementations of rayon::IntoParallelIterator.

Example

fn main() {
    use mileage::CharRange;
    for ch in CharRange::from('a'..='z') {
        // ch is each codepoint in lowercase ascii in sorted order
        dbg!(ch);
    }
    for ch in CharRange::from(..) {
        // ch is every valid char in sorted order
        dbg!(ch);
    }
}

Planned (eventually)

  • CharMapRefMut
  • CharMapBuf