trends 0.1.2

Simple trend detection for ordered values
Documentation
  • Coverage
  • 46.15%
    6 out of 13 items documented2 out of 2 items with examples
  • Size
  • Source code size: 14.33 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 378.49 kB 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
  • oOp995/trends
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • oOp995

trends

Simple trend detection for Rust.

Compare two ordered values and classify the result as:

  • Trend::Rising
  • Trend::Falling
  • Trend::Stable

Example

use trends::TrendExt;

let trend = 10.to_trend(&20);

assert!(trend.is_rising());
assert_eq!(trend.direction(), 1);

Works with any T: Ord.

Explore