use-diagnostic-message 0.0.1

Plain-text diagnostic message primitives for RustUse
Documentation
  • Coverage
  • 100%
    11 out of 11 items documented1 out of 10 items with examples
  • Size
  • Source code size: 8 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 518.82 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-message

Plain-text diagnostic message primitives for RustUse.

Foundation

use-diagnostic-message provides DiagnosticMessage and DiagnosticNote, small string-backed values for human-facing diagnostic text.

Messages and notes are trimmed at the edges, reject empty values, and remain renderer-neutral. They do not carry Markdown, ANSI, color, terminal, or layout assumptions.

Example

use use_diagnostic_message::{DiagnosticMessage, DiagnosticNote};

let message = DiagnosticMessage::new(" missing required field ").unwrap();
let note = DiagnosticNote::new("field names are case-sensitive").unwrap();

assert_eq!(message.as_str(), "missing required field");
assert_eq!(note.to_string(), "field names are case-sensitive");

Scope

  • Messages and notes are plain text.
  • The crate validates presence, not grammar or style.
  • Formatting, colors, markup, and terminal rendering are out of scope.

Status

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