{"id":57086,"library":"thiserror","title":"Thiserror","description":"derive(Error) for easy custom error types.","status":"active","version":"2.0.18","language":"rust","source_language":null,"source_url":"https://github.com/dtolnay/thiserror","tags":["error","derive","macros"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\nthiserror = \"2.0.18\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add thiserror","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"Error","correct":"use thiserror::Error;"}],"quickstart":{"code":"use thiserror::Error;\n\n#[derive(Error, Debug)]\npub enum MyError {\n    #[error(\"network error: {0}\")]\n    Network(String),\n    #[error(\"not found\")]\n    NotFound,\n}\n\nfn main() {\n    let err = MyError::NotFound;\n    println!(\"{}\", err);\n}","lang":"rust","description":"Defines a custom error enum with Display and Error trait implementations via derive."},"warnings":[],"env_vars":null,"search_vec":"'custom':6 'deriv':2,10 'easi':5 'error':3,7,9 'macro':11 'thiserror':1 'type':8","created_at":"2026-06-16T15:27:39.825898+00:00","updated_at":"2026-06-16T15:27:39.825898+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/dtolnay/thiserror","github":"https://github.com/dtolnay/thiserror","docs":"https://docs.rs/thiserror/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-16","next_check":"2026-12-13","install_tag":null}}