use-bound 0.0.1

Inclusive and exclusive bound primitives for RustUse
Documentation
  • Coverage
  • 5.88%
    1 out of 17 items documented1 out of 11 items with examples
  • Size
  • Source code size: 5.69 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 424.63 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 15s Average build duration of successful builds.
  • all releases: 15s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-validate
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-bound

Inclusive and exclusive bound primitives for RustUse.

Install

[dependencies]
use-bound = "0.0.1"

Foundation

use-bound models lower and upper bounds explicitly, with inclusive and exclusive variants that work with any PartialOrd value.

Example

use use_bound::{exclusive_minimum, maximum};

let lower = exclusive_minimum(0);
let upper = maximum(10);

assert!(lower.allows(&1));
assert!(upper.allows(&10));

When to use directly

Choose use-bound when you only need reusable lower and upper bound primitives.

Scope

  • Bounds stay generic over PartialOrd values.
  • Higher-level range assembly lives in use-range.

Status

use-bound is a pre-1.0 crate with a deliberately small API.