{"id":19958546,"url":"https://github.com/badeend/result","last_synced_at":"2025-08-03T09:08:44.531Z","repository":{"id":231997444,"uuid":"783208772","full_name":"badeend/Result","owner":"badeend","description":"For failures that are not exceptional: `Result\u003cT,E\u003e` for C#.","archived":false,"fork":false,"pushed_at":"2025-03-09T11:00:30.000Z","size":156,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-30T12:41:19.744Z","etag":null,"topics":["csharp","error-handling","functional-programming","monad"],"latest_commit_sha":null,"homepage":"https://badeend.github.io/Result/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/badeend.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"badeend"}},"created_at":"2024-04-07T08:35:26.000Z","updated_at":"2025-03-09T11:00:10.000Z","dependencies_parsed_at":"2024-05-03T18:47:49.658Z","dependency_job_id":"a0345711-ee49-4579-8be8-d585f945b15c","html_url":"https://github.com/badeend/Result","commit_stats":null,"previous_names":["badeend/result"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/badeend/Result","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badeend%2FResult","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badeend%2FResult/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badeend%2FResult/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badeend%2FResult/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/badeend","download_url":"https://codeload.github.com/badeend/Result/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badeend%2FResult/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268519123,"owners_count":24263048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","error-handling","functional-programming","monad"],"created_at":"2024-11-13T01:43:34.584Z","updated_at":"2025-08-03T09:08:44.404Z","avatar_url":"https://github.com/badeend.png","language":"C#","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./docs/images/logo.png\" alt=\"Result\" width=\"300\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cem\u003eFor failures that are not exceptional.\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.nuget.org/packages/Badeend.Result\"\u003e\u003cimg src=\"https://img.shields.io/nuget/v/Badeend.Result\" alt=\"Nuget\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\nThis packages provides a `Result\u003cTValue, TError\u003e` type for C#, spiritually similar to those available in [Rust](https://doc.rust-lang.org/std/result/enum.Result.html), [Swift](https://developer.apple.com/documentation/swift/result), [Kotlin](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-result/), [C++](https://en.cppreference.com/w/cpp/utility/expected) and basically every functional programming language under the sun.\n\nResults are commonly used in scenarios where failure is anticipated can be handled gracefully by the caller. Examples include:\n- Input validation,\n- Parsing and conversion,\n- Invocation of external services,\n- Authentication and authorization,\n- and more ...\n\n`Result\u003cTValue, TError\u003e` represents the result of a fallible operation as a first class value. A result can be in one of two states: \"success\" or \"error\". Both states have an associated payload of type `TValue` or `TError` respectively.\n\n---\n\n**Documentation \u0026 more information at: https://badeend.github.io/Result/**\n\n---\n\n#### Why does this package exist?\n\nWhile there are many similar packages available, this one is designed to address specific needs that others did not fully meet:\n\n- **No opinion on what is allowed to be an error.** The error type (`TError`) is parameterized without constraints.\n- **Focus on simplicity.** This package is designed to provide just what's needed without introducing an extensive Functional Programming framework. Users should be able to sprinkle on Results in existing codebases without overwhelming it with additional FP concepts.\n- **For C# developers.** The goal is to make it feel as \"native\" to the language as possible, using .NET naming \u0026 design conventions, and avoiding a paradigm shift in how C# code ought to be written.\n\n---\n\n### Shameless self-promotion\n\nMay I interest you in one of my other packages?\n\n- **[Badeend.ValueCollections](https://badeend.github.io/ValueCollections/)**: _Low overhead immutable collection types with structural equality._\n- **[Badeend.EnumClass](https://badeend.github.io/EnumClass/)**: _Discriminated unions for C# with exhaustiveness checking._\n- **[Badeend.Result](https://badeend.github.io/Result/)**: _For failures that are not exceptional: `Result\u003cT,E\u003e` for C#._\n- **[Badeend.Any](https://badeend.github.io/Any/)**: _Holds any value of any type, without boxing small structs (up to 8 bytes)._\n- **[Badeend.Nothing](https://github.com/badeend/Nothing)**: _If you want to use `void` as a type parameter, but C# won't let you._","funding_links":["https://github.com/sponsors/badeend"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadeend%2Fresult","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbadeend%2Fresult","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadeend%2Fresult/lists"}