pat 1.0.1

tap values in place
Documentation
  • Coverage
  • 0%
    0 out of 3 items documented0 out of 2 items with examples
  • Size
  • Source code size: 3.22 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 240.29 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • theMackabu

Pat

A Rust trait for performing operations on a value while returning the value itself, enabling fluent and chainable APIs.

Usage

use pat::Tap;

let result = 5
	 .tap(|x| *x += 1)
	 .tap(|x| *x *= 2);

assert_eq!(result, 12);

Features

  • Universal implementation for all types
  • Chainable operations
  • Preserves original type