{"id":16122132,"url":"https://github.com/foxcapades/d-lib-option","last_synced_at":"2026-01-19T18:31:14.957Z","repository":{"id":90410993,"uuid":"178232823","full_name":"Foxcapades/d-lib-option","owner":"Foxcapades","description":null,"archived":false,"fork":false,"pushed_at":"2019-07-18T18:27:58.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T11:48:41.558Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"D","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/Foxcapades.png","metadata":{"files":{"readme":"readme.adoc","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":"2019-03-28T15:34:43.000Z","updated_at":"2019-07-18T18:28:00.000Z","dependencies_parsed_at":"2023-03-13T17:58:36.981Z","dependency_job_id":null,"html_url":"https://github.com/Foxcapades/d-lib-option","commit_stats":{"total_commits":10,"total_committers":2,"mean_commits":5.0,"dds":"0.30000000000000004","last_synced_commit":"f414b5f95abe1cfd447696c326073e08a1806faa"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Foxcapades/d-lib-option","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Foxcapades%2Fd-lib-option","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Foxcapades%2Fd-lib-option/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Foxcapades%2Fd-lib-option/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Foxcapades%2Fd-lib-option/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Foxcapades","download_url":"https://codeload.github.com/Foxcapades/d-lib-option/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Foxcapades%2Fd-lib-option/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28580143,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T18:29:59.827Z","status":"ssl_error","status_checked_at":"2026-01-19T18:29:40.878Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2024-10-09T21:09:37.809Z","updated_at":"2026-01-19T18:31:14.937Z","avatar_url":"https://github.com/Foxcapades.png","language":"D","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Options for D!\n\nExciting!\n\nComes in 2 flavors!\n\nDefinitely done before!\n\nTruly astonishing!\n\n== Q\u0026A\n\n=== What is this?\n\nA small minded implementation of option types in D.\n\n=== Why not just use \u003cother option lib\u003e?\n\nYou should definitely use \u003cother option lib\u003e.\n\n=== Will it finally allow me to download a car?\n\nIt absolutely will, yes.\n\n== Use the things\n\n=== `option(T)` struct form for when you want structs\n\n[source, d]\n----\nauto foo  = none!int;\nauto bar  = some(3);\nauto fizz = maybe!(int*)(null);\nauto buzz = some!(int*)(null); // ERROR\n----\n\n=== `Option(T)` class form for when you want classes\n\n[source, d]\n----\nauto foo  = Options.none!int();\nauto bar  = Options.some(3);\nauto fizz = Options.maybe!(int*)(null);\nauto buzz = Options.some!(int*)(null); // ERROR\n----\n\n=== `==` and `!=` Overload for when you want to use `==` or `!=`\n\n[source, d]\n----\nauto noneA  = none!int;\nauto noneB  = none!int;\nauto some2a = some!int(2);\nauto some2b = some!int(2);\nauto some3  = some!int(3);\n\nassert(noneA == noneB);\nassert(noneA != some3);\nassert(some2a == some2b);\nassert(some2a != some3);\n----\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxcapades%2Fd-lib-option","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoxcapades%2Fd-lib-option","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxcapades%2Fd-lib-option/lists"}