{"id":17321148,"url":"https://github.com/lambda-fairy/option-filter","last_synced_at":"2025-12-12T15:14:51.567Z","repository":{"id":57650068,"uuid":"69951103","full_name":"lambda-fairy/option-filter","owner":"lambda-fairy","description":"Adds a .filter() method to Option\u003cT\u003e","archived":false,"fork":false,"pushed_at":"2018-06-22T07:39:43.000Z","size":3,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T10:48:41.542Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://docs.rs/option-filter","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lambda-fairy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-04T09:30:06.000Z","updated_at":"2019-01-15T01:42:39.000Z","dependencies_parsed_at":"2022-09-09T05:20:22.148Z","dependency_job_id":null,"html_url":"https://github.com/lambda-fairy/option-filter","commit_stats":null,"previous_names":["lfairy/option-filter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambda-fairy%2Foption-filter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambda-fairy%2Foption-filter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambda-fairy%2Foption-filter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambda-fairy%2Foption-filter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lambda-fairy","download_url":"https://codeload.github.com/lambda-fairy/option-filter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248438510,"owners_count":21103409,"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":[],"created_at":"2024-10-15T13:35:26.588Z","updated_at":"2025-12-12T15:14:51.495Z","avatar_url":"https://github.com/lambda-fairy.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# option-filter [![Cargo](https://img.shields.io/crates/v/option-filter.svg)](https://crates.io/crates/option-filter)\n\nThis crate adds a `.filter()` method to `Option\u003cT\u003e`, for older versions of Rust that don't provide it.\n\n**Note: [`Option::filter`][std] was added to the standard library in [Rust 1.27][rust]. Unless you need to support older versions of Rust, you do not need to use this crate.**\n\n[std]: https://doc.rust-lang.org/std/option/enum.Option.html#method.filter\n[rust]: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1270-2018-06-21\n\n## Usage\n\nTo use it, add `option-filter` to your `Cargo.toml`:\n\n```toml\n[dependencies]\noption-filter = \"1.0\"\n```\n\nThen import the extension trait:\n\n```rust,ignore\nextern crate option_filter;\nuse option_filter::OptionFilterExt;\n```\n\nNow you can filter your `Option`s!\n\n```rust\nlet answer = Some(42);\nassert_eq!(answer.filter(|x| *x == 42), Some(42));\nassert_eq!(answer.filter(|x| *x == 43), None);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambda-fairy%2Foption-filter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flambda-fairy%2Foption-filter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambda-fairy%2Foption-filter/lists"}