{"id":16001302,"url":"https://github.com/jdno/typed-fields","last_synced_at":"2025-03-17T19:32:09.093Z","repository":{"id":216722559,"uuid":"741964937","full_name":"jdno/typed-fields","owner":"jdno","description":"Macros to create strongly-typed fields for structs","archived":false,"fork":false,"pushed_at":"2025-03-14T06:34:07.000Z","size":188,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-14T07:30:18.414Z","etag":null,"topics":["crate","newtype","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jdno.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-11T13:33:37.000Z","updated_at":"2025-03-14T06:34:10.000Z","dependencies_parsed_at":"2025-01-19T09:26:14.498Z","dependency_job_id":"08c7666c-0427-45d6-98c1-4626e5c7a257","html_url":"https://github.com/jdno/typed-fields","commit_stats":null,"previous_names":["jdno/typed-fields"],"tags_count":4,"template":false,"template_full_name":"jdno/template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdno%2Ftyped-fields","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdno%2Ftyped-fields/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdno%2Ftyped-fields/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdno%2Ftyped-fields/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdno","download_url":"https://codeload.github.com/jdno/typed-fields/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243544667,"owners_count":20308168,"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","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":["crate","newtype","rust"],"created_at":"2024-10-08T09:41:45.952Z","updated_at":"2025-03-17T19:32:08.762Z","avatar_url":"https://github.com/jdno.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🦀 `typed-fields`\n\nDo you like strongly-typed structs?\n\n`typed-fields` is a collection of macros that generate types following the\n[newtype] pattern. The following types are currently supported:\n\n- `name!` - a string-based type\n- `number!` - a number-based type\n- `secret!` - a type for secrets (requires the `secret` feature)\n- `ulid!` - a type for ULIDs (requires the `ulid` feature)\n- `url!` - a type for URLs (requires the `url` feature)\n- `uuid!` - a type for UUIDs (requires the `uuid` feature)\n\n## Example\n\nThe following example showcases the `number!` macro, which generates a new type\nthat is backed by an `i64`.\n\n```rust\nuse typed_fields::number;\n\n// Define a new type that is backed by an `i64`\nnumber!(UserId);\n\nfn main() {\n    // Create a new `UserId` from an `i64`\n    let id = UserId::new(42);\n\n    // Common traits like `Display` are automatically implemented for the type\n    println!(\"User ID: {}\", id);\n}\n```\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE)\n  or \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT license ([LICENSE-MIT](LICENSE-MIT)\n  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[newtype]: https://doc.rust-lang.org/rust-by-example/generics/new_types.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdno%2Ftyped-fields","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdno%2Ftyped-fields","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdno%2Ftyped-fields/lists"}