{"id":69563,"library":"fn-error-context","title":"Fn Error Context","description":"An attribute macro to add context to errors from a function.","status":"active","version":"0.2.1","language":"rust","source_language":null,"source_url":"https://github.com/andrewhickman/fn-error-context","tags":["error-handling","macros","context"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\nfn-error-context = \"0.2.1\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add fn-error-context","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"context","correct":"use fn_error_context::context;"}],"quickstart":{"code":"use fn_error_context::context;\n\n#[context(\"Failed to process input\")]\nfn process(input: &str) -> Result<(), String> {\n    if input.is_empty() {\n        Err(\"empty input\".to_string())\n    } else {\n        Ok(())\n    }\n}\n\nfn main() {\n    process(\"\").unwrap_err(); // Error includes context\n}","lang":"rust","description":"Adds error context to a function using an attribute macro."},"warnings":[],"env_vars":null,"search_vec":"'add':8 'attribut':5 'context':3,9,19 'error':2,11,16 'error-handl':15 'fn':1 'function':14 'handl':17 'macro':6,18","created_at":"2026-06-17T18:03:13.756947+00:00","updated_at":"2026-06-17T18:03:13.756947+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/andrewhickman/fn-error-context","github":"https://github.com/andrewhickman/fn-error-context","docs":"https://docs.rs/fn-error-context/","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-17","next_check":"2026-12-14","install_tag":null}}