use-range 0.0.1

Comparable range validation primitives for RustUse
Documentation
  • Coverage
  • 25%
    2 out of 8 items documented1 out of 5 items with examples
  • Size
  • Source code size: 7.07 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 407.55 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 8s 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-range

Comparable range validation primitives for RustUse.

Install

[dependencies]
use-range = "0.0.1"

Foundation

use-range composes optional lower and upper bounds into a reusable RangeConstraint<T> that can validate comparable values.

Example

use use_bound::{maximum, minimum};
use use_range::RangeConstraint;

let range = RangeConstraint::new(Some(minimum(1)), Some(maximum(10)))?;

assert!(range.contains(&5));
assert!(!range.contains(&11));
# Ok::<(), use_range::RangeError>(())

When to use directly

Choose use-range when you need one reusable range primitive without a broader validation facade.

Scope

  • Ranges stay generic over PartialOrd values.
  • Bound construction lives in use-bound.
  • Domain-specific error reporting is out of scope.

Status

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