{"id":24482839,"url":"https://github.com/tylerbloom/typedid","last_synced_at":"2025-04-13T16:43:30.988Z","repository":{"id":58165873,"uuid":"530257136","full_name":"TylerBloom/TypedId","owner":"TylerBloom","description":"Make your IDs strongly typed!!","archived":false,"fork":false,"pushed_at":"2022-09-22T16:02:39.000Z","size":24,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T08:11:57.734Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TylerBloom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-29T14:30:16.000Z","updated_at":"2025-03-25T09:14:32.000Z","dependencies_parsed_at":"2022-09-23T11:51:33.632Z","dependency_job_id":null,"html_url":"https://github.com/TylerBloom/TypedId","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TylerBloom%2FTypedId","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TylerBloom%2FTypedId/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TylerBloom%2FTypedId/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TylerBloom%2FTypedId/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TylerBloom","download_url":"https://codeload.github.com/TylerBloom/TypedId/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248747561,"owners_count":21155473,"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":[],"created_at":"2025-01-21T12:15:40.095Z","updated_at":"2025-04-13T16:43:30.969Z","avatar_url":"https://github.com/TylerBloom.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Crates.io](https://img.shields.io/crates/v/typed_id.svg)](https://crates.io/crates/typed_id)\n[![Documentation](https://docs.rs/typed_id/badge.svg)](https://docs.rs/typed_id/)\n![GitHub Workflows](https://github.com/TylerBloom/TypedId/actions/workflows/ci.yml/badge.svg)\n[![Coverage Status](https://codecov.io/gh/TylerBloom/TypedId/branch/main/graph/badge.svg)](https://codecov.io/gh/TylerBloom/TypedId)\n![Maintenance](https://img.shields.io/badge/Maintenance-Actively%20Developed-brightgreen.svg)\n\n## About\n`TypedId` introduces a single type, aptly named `TypedId`. This is a generic\nwrapper any type, often types that you would use as an identifier. However,\neach instance of a `TypedId` has a free-generic parameter that you can use to\nassociate that ID type to a given struct (or collection of structs).\n\nThis allows you to have an added layer of type-checked safety at compile time\nthat disappears at run time! You can have all your types use the same\nunderlying structure for their identifiers while never have to worry about\nswapping them around.\n\n## How it Works\n`TypedId`s are very straightforward.\nThe easiest way to use them is why declaring your own `type`s that use `TypedId`.\nFor example,\n```rust\nuse typed_id::TypedId;\n\npub struct Customer {\n    id: CustomerId,\n    /* Likely other fields */\n}\n\npub type CustomerId = TypedId\u003cu32, Customer\u003e;\n```\n\nIt's that simple! If you have other types that you need ids for, simply add\nanother `type` and `TypedId` will handle all the boilerplate for you!\n\nNote, that `TypedId` has an optional dependency on `serde`. When enabled, this\nadds an opinionated (de)serialization implementation. This implementation\n(de)serializes a `TypedId` as its underlying type.\n\n## Why use \nRust has a very powerful type system with many amazing properties. This\nleverages that system to prevent simple typos, such as passing in the wrong\ntype to a function.\n\n## Contribution\nIf you want to contribute to or improve upon this library, please do so.\nFork this project or submit an issue or a pull request for a\nfeature/fix/change/etc. All that I ask is for derived/iterative\nlibraries to be open and free to use and ideally with the same license\n(LGPL v2.1). Any other application or library that uses this library can\nuse any license.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftylerbloom%2Ftypedid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftylerbloom%2Ftypedid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftylerbloom%2Ftypedid/lists"}