{"id":18700742,"url":"https://github.com/btwiuse/nothing","last_synced_at":"2025-06-11T13:35:04.980Z","repository":{"id":56900053,"uuid":"477516923","full_name":"btwiuse/nothing","owner":"btwiuse","description":"Probably a better Option.","archived":false,"fork":false,"pushed_at":"2023-12-04T14:25:44.000Z","size":13,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-04T13:30:54.979Z","etag":null,"topics":["nothing","option","rust-crate"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/nothing","language":"Rust","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/btwiuse.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-04T01:51:29.000Z","updated_at":"2022-09-22T17:26:06.000Z","dependencies_parsed_at":"2024-11-07T11:43:10.243Z","dependency_job_id":"72a2b68d-87c4-412c-88d2-d620341125fe","html_url":"https://github.com/btwiuse/nothing","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"d66d923ce20551be2f58fb7f7b451aee054be660"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btwiuse%2Fnothing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btwiuse%2Fnothing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btwiuse%2Fnothing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btwiuse%2Fnothing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/btwiuse","download_url":"https://codeload.github.com/btwiuse/nothing/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btwiuse%2Fnothing/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259274315,"owners_count":22832498,"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","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":["nothing","option","rust-crate"],"created_at":"2024-11-07T11:39:15.207Z","updated_at":"2025-06-11T13:35:04.958Z","avatar_url":"https://github.com/btwiuse.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"nothing\n=======\n\n[![crates.io](https://img.shields.io/crates/v/nothing.svg)](https://crates.io/crates/nothing)\n[![Documentation](https://docs.rs/nothing/badge.svg)](https://docs.rs/nothing)\n[![Build Status](https://travis-ci.org/btwiuse/nothing.svg?branch=master)](https://travis-ci.org/btwiuse/nothing)\n\nnothing::[Probably] is a better [Option].\n\n```\npub enum Probably\u003cT\u003e {\n    Nothing,\n    Something(T),\n}\n```\n\n## Why?\n\nThe point is that you can use [Probably] as the return type of your main function:\n\n```\nuse nothing::{Probably, Nothing};\n\nfn main() -\u003e Probably\u003c()\u003e {\n    Nothing\n}\n```\n\nExit code is `0` if it is [Something], `1` if [Nothing]. \n\nYou can even use the `?` operator the way you would with [Option] and [Result]. See [./examples/main.rs](https://github.com/btwiuse/nothing/blob/master/examples/main.rs)\n\n![Probably::Nothing](https://camo.githubusercontent.com/8bfa566db90d366cb0dd026267f78a7dfca0c3193cb84172b90d05b594b7062c/68747470733a2f2f692e696d6775722e636f6d2f41754464624f4b2e706e67)\n\n## Not convinced?\n\nReal-world examples:\n\n- [that](https://crates.io/crates/that)\n\nProbably nothing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbtwiuse%2Fnothing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbtwiuse%2Fnothing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbtwiuse%2Fnothing/lists"}