use-diagnostic-level 0.0.1

Diagnostic severity primitives for RustUse
Documentation
  • Coverage
  • 100%
    10 out of 10 items documented1 out of 6 items with examples
  • Size
  • Source code size: 6.83 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 420.41 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-diagnostic
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-diagnostic-level

Diagnostic severity primitives for RustUse.

Foundation

use-diagnostic-level provides DiagnosticLevel, a small ordered severity enum with Info, Warning, Error, and Fatal.

More severe levels compare greater than less severe levels. The crate does not attach colors, terminal behavior, logging behavior, or exit-code behavior.

Example

use use_diagnostic_level::DiagnosticLevel;

let level: DiagnosticLevel = "warn".parse().unwrap();

assert_eq!(level, DiagnosticLevel::Warning);
assert!(DiagnosticLevel::Fatal > DiagnosticLevel::Error);

Scope

  • Levels are severity values only.
  • Parsing accepts common lowercase aliases.
  • Rendering, logging, process exits, and terminal color are out of scope.

Status

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