set 0.1.1

A simple trait representing a set of data.
Documentation
  • Coverage
  • 100%
    5 out of 5 items documented2 out of 5 items with examples
  • Size
  • Source code size: 3.3 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.4 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • SamWhited
set-0.1.1 has been yanked.

A simple interface with methods for manipulating sets.

Examples

use set;
use set::Set;

// A set that contains ASCII
let ascii = set::predicate(|c| c as u32 <= 0x7F);
assert!(ascii.contains('a'));
assert!(!ascii.contains(''));

let s = set::predicate(|c: char| c.is_uppercase());
assert!(s.contains('B'));

// A char is a quine atom. That is, it is a set that contains only itself.
assert!('t'.contains('t'));

// Functions and closures that match the signature of contains are themselves sets.
assert!(char::is_lowercase.contains('b'));