| Crates.io | pat |
| lib.rs | pat |
| version | 1.0.1 |
| created_at | 2024-09-10 03:07:31.536118+00 |
| updated_at | 2024-09-10 03:15:27.258988+00 |
| description | tap values in place |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1370002 |
| size | 3,224 |
A Rust trait for performing operations on a value while returning the value itself, enabling fluent and chainable APIs.
use pat::Tap;
let result = 5
.tap(|x| *x += 1)
.tap(|x| *x *= 2);
assert_eq!(result, 12);