#thiserror #error #derive-error #enums #detail

macro no-std thiserror-core-impl

Implementation detail of the thiserror crate

3 stable releases

1.0.50 Nov 19, 2023
1.0.38 Feb 19, 2023
1.0.37 Dec 10, 2022

#19 in #thiserror

Download history 45994/week @ 2024-01-03 49361/week @ 2024-01-10 59478/week @ 2024-01-17 49231/week @ 2024-01-24 49154/week @ 2024-01-31 52278/week @ 2024-02-07 54906/week @ 2024-02-14 54860/week @ 2024-02-21 53334/week @ 2024-02-28 49132/week @ 2024-03-06 46621/week @ 2024-03-13 51274/week @ 2024-03-20 43597/week @ 2024-03-27 51096/week @ 2024-04-03 48329/week @ 2024-04-10 35148/week @ 2024-04-17

186,191 downloads per month
Used in 34 crates (via thiserror-core)

MIT/Apache

57KB
1.5K SLoC

derive(Error) for no_std environments

This is a fork of thiserror using the nightly only, experimental error_in_core feature in no_std environments.

Usage

// Cargo.toml
[dependencies]
thiserror = { version = "1.0", package = "thiserror-core", default-features = false }

Compiler support: requires rustc 1.56+ @@ -23,200 +18,16 @@ thiserror = "1.0"

Example

// main.rs / lib.rs
#![no_std]
#![feature(error_in_core)]

Differences between thiserror and thiserror-core

Differences are kept to a minimum and changes in thiserror master will be adopted by rebasing thiserror-core.

With the default std feature enabled, any functional difference between thiserror and thiserror-core is considered a bug.

As soon as equivalent changes are adopted, this crate will be updated to re-export thiserror.

Dependencies

~325–780KB
~19K SLoC