{"id":21986051,"url":"https://github.com/tamschi/fn-formats","last_synced_at":"2025-10-13T19:16:22.530Z","repository":{"id":41967667,"uuid":"291461924","full_name":"Tamschi/fn-formats","owner":"Tamschi","description":"Format trait wrappers for Fn(\u0026mut Formatter) -\u003e fmt::Result","archived":false,"fork":false,"pushed_at":"2023-01-05T17:00:59.000Z","size":74,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-03-23T02:17:43.650Z","etag":null,"topics":["closures","format-traits"],"latest_commit_sha":null,"homepage":"https://lib.rs/crates/fn-formats","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tamschi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-30T12:01:30.000Z","updated_at":"2024-12-13T20:21:44.000Z","dependencies_parsed_at":"2023-02-04T08:01:51.492Z","dependency_job_id":null,"html_url":"https://github.com/Tamschi/fn-formats","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/Tamschi/fn-formats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tamschi%2Ffn-formats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tamschi%2Ffn-formats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tamschi%2Ffn-formats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tamschi%2Ffn-formats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tamschi","download_url":"https://codeload.github.com/Tamschi/fn-formats/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tamschi%2Ffn-formats/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016887,"owners_count":26085884,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"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":["closures","format-traits"],"created_at":"2024-11-29T18:16:54.926Z","updated_at":"2025-10-13T19:16:22.515Z","avatar_url":"https://github.com/Tamschi.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fn-formats\n\n[![Lib.rs](https://img.shields.io/badge/Lib.rs-*-84f)](https://lib.rs/crates/fn-formats)\n[![Crates.io](https://img.shields.io/crates/v/fn-formats)](https://crates.io/crates/fn-formats)\n[![Docs.rs](https://docs.rs/fn-formats/badge.svg)](https://docs.rs/crates/fn-formats)\n\n![Rust 1.40.0](https://img.shields.io/static/v1?logo=Rust\u0026label=\u0026message=1.40.0\u0026color=grey)\n[![CI](https://github.com/Tamschi/fn-formats/workflows/CI/badge.svg?branch=develop)](https://github.com/Tamschi/fn-formats/actions?query=workflow%3ACI+branch%3Adevelop)\n![Crates.io - License](https://img.shields.io/crates/l/fn-formats/0.0.5)\n\n[![GitHub](https://img.shields.io/static/v1?logo=GitHub\u0026label=\u0026message=%20\u0026color=grey)](https://github.com/Tamschi/fn-formats)\n[![open issues](https://img.shields.io/github/issues-raw/Tamschi/fn-formats)](https://github.com/Tamschi/fn-formats/issues)\n[![open pull requests](https://img.shields.io/github/issues-pr-raw/Tamschi/fn-formats)](https://github.com/Tamschi/fn-formats/pulls)\n[![crev reviews](https://web.crev.dev/rust-reviews/badge/crev_count/fn-formats.svg)](https://web.crev.dev/rust-reviews/crate/fn-formats/)\n\nThis is a small shim library for passing closures where you need one of the format traits (including [`Binary`] etc.).\n\n[`Binary`]: https://doc.rust-lang.org/stable/core/fmt/trait.Binary.html\n\n## Installation\n\nPlease use [cargo-edit](https://crates.io/crates/cargo-edit) to always add the latest version of this library:\n\n```cmd\ncargo add fn-formats\n```\n\n## Example\n\n```rust\nuse fn_formats::DebugFmt;\n\nlet debug = DebugFmt(|f| {\n    f.debug_struct(\"StructName\")\n        .field(\"list\", \u0026DebugFmt(|f| f.debug_list().entries(\u0026[1, 2, 3]).finish()))\n        .field(\"set\", \u0026DebugFmt(|f| f.debug_set().entries(\u0026[4, 5, 6]).finish()))\n        .finish()\n});\n\nassert_eq!(format!(\"{:?}\", debug), \"StructName { list: [1, 2, 3], set: {4, 5, 6} }\");\n```\n\n## License\n\nLicensed under either of\n\n* Apache License, Version 2.0\n   ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n* MIT license\n   ([LICENSE-MIT](LICENSE-MIT) or \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n\n## [Code of Conduct](CODE_OF_CONDUCT.md)\n\n## [Changelog](CHANGELOG.md)\n\n## Versioning\n\n`fn-formats` strictly follows [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html) with the following exceptions:\n\n* The minor version will not reset to 0 on major version changes (except for v1).  \nConsider it the global feature level.\n* The patch version will not reset to 0 on major or minor version changes (except for v0.1 and v1).  \nConsider it the global patch level.\n\nThis includes the Rust version requirement specified above.  \nEarlier Rust versions may be compatible, but this can change with minor or patch releases.\n\nWhich versions are affected by features and patches can be determined from the respective headings in [CHANGELOG.md](CHANGELOG.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftamschi%2Ffn-formats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftamschi%2Ffn-formats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftamschi%2Ffn-formats/lists"}