specification-core 0.1.0

Composable, strongly typed specifications for Rust
Documentation
  • Coverage
  • 100%
    57 out of 57 items documented3 out of 54 items with examples
  • Size
  • Source code size: 69.8 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: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • SoundBlaster/specification-core-rs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • SoundBlaster

specification-core

specification-core is the synchronous, dependency-conscious Rust foundation for composable business rules based on the Specification Pattern. A Specification<T> evaluates a borrowed T; closures work directly as specifications and the and, or, and not methods construct statically dispatched, allocation-free rules.

use specification_core::Specification;

let is_positive = |value: &i32| *value > 0;
assert!(is_positive.is_satisfied_by(&1));