Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tranzystorekk/option-extra
Additional utilities for Rust's common std types
https://github.com/tranzystorekk/option-extra
contributions-welcome hacktoberfest library rust-lang utilities
Last synced: 21 days ago
JSON representation
Additional utilities for Rust's common std types
- Host: GitHub
- URL: https://github.com/tranzystorekk/option-extra
- Owner: tranzystorekk
- License: mit
- Created: 2021-07-04T13:24:38.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-03-20T15:36:00.000Z (over 2 years ago)
- Last Synced: 2023-10-28T06:24:51.729Z (about 1 year ago)
- Topics: contributions-welcome, hacktoberfest, library, rust-lang, utilities
- Language: Rust
- Homepage:
- Size: 22.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# option-extra
[![CI](https://github.com/tranzystorek-io/option-extra/actions/workflows/ci.yml/badge.svg)](https://github.com/tranzystorek-io/option-extra/actions/workflows/ci.yml)
## About
Additional utilities for common standard types, that feel missing.
## Usage
New methods live in the `OptionExt` / `ResultExt` traits:
```rust
use option_extra::OptionExt;assert_eq!(Some(1).zip_lazy(|| Some("abcd")), Some((1, "abcd")));
``````rust
use option_extra::ResultExt;assert!(Ok::<_, ()>(1).satisfies(|&n| n % 2 == 1));
```## Contributing
If you want something added to this library, submit a PR or a discussion
in the [Ideas](https://github.com/tranzystorek-io/option-extra/discussions/categories/ideas) channel!