{"id":15749511,"url":"https://github.com/ksxgithub/tap-trait","last_synced_at":"2026-01-21T02:02:12.983Z","repository":{"id":37982825,"uuid":"389555384","full_name":"KSXGitHub/tap-trait","owner":"KSXGitHub","description":"Inspect and mutate values without leaving the method chain","archived":false,"fork":false,"pushed_at":"2023-03-13T05:57:46.000Z","size":13,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-25T18:43:17.077Z","etag":null,"topics":["chain","crate","no-std","rust","rust-patterns","tap","trait"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/tap-trait","language":"Rust","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/KSXGitHub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":null,"patreon":"khai96_","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-07-26T08:01:08.000Z","updated_at":"2022-03-18T07:58:16.000Z","dependencies_parsed_at":"2023-02-10T01:05:13.271Z","dependency_job_id":null,"html_url":"https://github.com/KSXGitHub/tap-trait","commit_stats":{"total_commits":6,"total_committers":2,"mean_commits":3.0,"dds":0.5,"last_synced_commit":"c9c4a42df2f0811c2e207d3c15ae0634aaec654b"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/KSXGitHub/tap-trait","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KSXGitHub%2Ftap-trait","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KSXGitHub%2Ftap-trait/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KSXGitHub%2Ftap-trait/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KSXGitHub%2Ftap-trait/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KSXGitHub","download_url":"https://codeload.github.com/KSXGitHub/tap-trait/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KSXGitHub%2Ftap-trait/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28622472,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T23:49:58.628Z","status":"online","status_checked_at":"2026-01-21T02:00:08.227Z","response_time":86,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["chain","crate","no-std","rust","rust-patterns","tap","trait"],"created_at":"2024-10-04T06:02:53.930Z","updated_at":"2026-01-21T02:02:12.966Z","avatar_url":"https://github.com/KSXGitHub.png","language":"Rust","readme":"# Tap Trait\n\n[![Test](https://github.com/KSXGitHub/tap-trait/workflows/Test/badge.svg)](https://github.com/KSXGitHub/tap-trait/actions?query=workflow%3ATest)\n[![Crates.io Version](https://img.shields.io/crates/v/tap-trait?logo=rust)](https://crates.io/crates/tap-trait)\n\nInspect and mutate values without leaving the method chain.\n\n## Example\n\n```rust\nuse tap_trait::Tap;\nuse pipe_trait::Pipe;\nlet result = 2i32\n    .tap(|x| assert_eq!(x, 2))\n    .tap_mut(|x| *x += 1)\n    .tap(|x| assert_eq!(x, 3))\n    .tap_mut(|x| *x *= 3)\n    .tap(|x| assert_eq!(x, 9))\n    .pipe(|x| -x)\n    .tap(|x| assert_eq!(x, -9))\n    .pipe_ref(ToString::to_string)\n    .tap_ref(|x| assert_eq!(x, \"-9\"))\n    .tap_mut(|x| *x += \".0\")\n    .tap_ref(|x| assert_eq!(x, \"-9.0\"));\nassert_eq!(result, \"-9.0\");\n```\n\n## License\n\n[MIT](https://git.io/J4otf) © [Hoàng Văn Khải](https://ksxgithub.github.io/).\n","funding_links":["https://patreon.com/khai96_"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksxgithub%2Ftap-trait","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fksxgithub%2Ftap-trait","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksxgithub%2Ftap-trait/lists"}