wurm

Crates.iowurm
lib.rswurm
version1.1.0
sourcesrc
created_at2022-09-07 06:31:33.492654
updated_at2022-09-07 19:09:27.531874
descriptionNon-fatal, strongly typed errors
homepagehttps://github.com/alex65536/wurm
repositoryhttps://github.com/alex65536/wurm
max_upload_size
id660061
size18,879
Alexander Kernozhitsky (alex65536)

documentation

README

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.

Commit count: 16

cargo fmt