splat 0.1.0

Error handling and highlighting for source files.
Documentation
  • Coverage
  • 0%
    0 out of 26 items documented0 out of 15 items with examples
  • Size
  • Source code size: 25.04 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.98 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • wtfsophia

Splat 0.1

Simple error handling and highlighting for source files.

Usage

let mut src = Source::new("my-file.txt", "The quick brown fox...");

src.add_message(0..0, "All of my problems start here.");
src.add_message(4..8, "Turns out this isn't quick.");
src.add_message(16..18, "And it's not a fox!");

// Pretty print the messages:
println!("{}", src);

Output

#1 - All of my problems start here.
     my-file.txt:1:1

#2 - Turns out this isn't quick.
     my-file.txt:1:5

#3 - And it's not a fox!
     my-file.txt:1:17

  1 │ The quick brown fox...
    │ │   ├───┘       │ │
    │ │   │           ├─┘
    │ 1   2           3
    │