{"id":18913772,"url":"https://github.com/archenoth/result","last_synced_at":"2026-04-30T19:32:31.855Z","repository":{"id":217252127,"uuid":"743387804","full_name":"Archenoth/Result","owner":"Archenoth","description":"A destructurable Rust-style Result type for Java!","archived":false,"fork":false,"pushed_at":"2024-01-15T05:59:05.000Z","size":52,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-01T05:34:37.606Z","etag":null,"topics":["destructuring","java","null-safety","result-type","sealed-interface"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Archenoth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2024-01-15T05:57:37.000Z","updated_at":"2024-01-15T06:14:02.000Z","dependencies_parsed_at":"2024-01-15T08:53:55.962Z","dependency_job_id":"c52b55aa-25d6-478c-9907-90e25a10bda4","html_url":"https://github.com/Archenoth/Result","commit_stats":null,"previous_names":["archenoth/result"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Archenoth/Result","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Archenoth%2FResult","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Archenoth%2FResult/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Archenoth%2FResult/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Archenoth%2FResult/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Archenoth","download_url":"https://codeload.github.com/Archenoth/Result/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Archenoth%2FResult/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32475192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["destructuring","java","null-safety","result-type","sealed-interface"],"created_at":"2024-11-08T10:08:54.396Z","updated_at":"2026-04-30T19:32:31.839Z","avatar_url":"https://github.com/Archenoth.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A destructurable Result type for Java 21+!\n\nThis library is a simple `Result` sealed interface allowing you to eliminate `null` in all kinds of places in a way that [Rustaceans have enjoyed for a long time](https://doc.rust-lang.org/std/result/)~\n\nMeaning you can do things like this!\n\n```java\nif(somethingThatReturnsAResult() instanceof Some(File found)){\n    file.delete();\n}\n```\n\nor this!\n\n```java\nreturn switch(somethingThatReturnsAResult()){\n    case Some(String message) -\u003e message;\n    case None() -\u003e \"Uh oh, nothing??\";\n};\n```\n\nor even this!\n\n```java\nreturn switch(somethingThatReturnsAResult()){\n    case Some(val num) when num == 1 -\u003e num + \" thing\";\n    case Some(val num) -\u003e num + \" things!\";\n    case None() -\u003e \"Uh oh, nothing??\";\n};\n```\n\nAll you need to do is wrap your return value with a `Result.of()`. It even works with wrapped `Optional` values!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchenoth%2Fresult","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farchenoth%2Fresult","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchenoth%2Fresult/lists"}