wurm 1.1.0

Non-fatal, strongly typed errors
Documentation
  • Coverage
  • 100%
    25 out of 25 items documented3 out of 10 items with examples
  • Size
  • Source code size: 19.97 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4.22 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
  • Homepage
  • alex65536/wurm
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • alex65536

Würm: non-fatal, strongly typed errors

Crates.io: wurm Documentation Build

Motivation

By default, errors in Rust are handled using Result<T, E>, which contains either a value or an error. But sometimes, you need to return a value alongside with one or many errors. In this case, you may need to use wurm.

Think of non-fatal errors as compiler warnings. The compiler will give you the result (i.e. the compiled binary) even if there are tons of warnings. You also receive the warnings and can inspect them to decide what to do.

As an alternative, you may just use a logger to yield such non-fatal errors, but you lose flexibility, because your errors will be just strings sent into a logger, and inspecting them from code can be problematic.

For motivating example and API documentation, go to the docs.

Why such name?

It's just modified word "warn" (as non-fatal errors can be also called warnings). So, "warn" → "würm" sound pretty similar.

License

This project is licensed under the MIT License. See LICENSE for more details.