{"id":21571385,"url":"https://github.com/andogq/tuple-traits","last_synced_at":"2026-01-26T08:35:22.516Z","repository":{"id":262228723,"uuid":"886594684","full_name":"andogq/tuple-traits","owner":"andogq","description":"Additional tuple traits to enable ergonomic types.","archived":false,"fork":false,"pushed_at":"2024-11-11T10:02:13.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-24T22:53:01.098Z","etag":null,"topics":["blazingly-fast","cons","ergonomic","rust","trait","tuples","types","typestate"],"latest_commit_sha":null,"homepage":"https://docs.rs/tuple-traits/latest","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/andogq.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-11T09:01:41.000Z","updated_at":"2024-11-11T10:24:43.000Z","dependencies_parsed_at":"2024-11-11T10:26:26.068Z","dependency_job_id":"dab35f50-246a-492d-8d6f-30ccf8684012","html_url":"https://github.com/andogq/tuple-traits","commit_stats":null,"previous_names":["andogq/tuple-traits"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andogq/tuple-traits","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andogq%2Ftuple-traits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andogq%2Ftuple-traits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andogq%2Ftuple-traits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andogq%2Ftuple-traits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andogq","download_url":"https://codeload.github.com/andogq/tuple-traits/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andogq%2Ftuple-traits/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28770911,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T07:45:00.504Z","status":"ssl_error","status_checked_at":"2026-01-26T07:45:00.070Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["blazingly-fast","cons","ergonomic","rust","trait","tuples","types","typestate"],"created_at":"2024-11-24T11:15:53.477Z","updated_at":"2026-01-26T08:35:22.503Z","avatar_url":"https://github.com/andogq.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003ch1\u003etuple-traits\u003c/h1\u003e\n    \u003cp\u003eAdditional traits to enable some \u003cdel\u003ecursed\u003c/del\u003e \u003ci\u003eergonomic\u003c/i\u003e types.\u003c/p\u003e\n    \u003c!-- --\u003e\n    \u003ca href=\"https://crates.io/crates/tuple-traits\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/tuple-traits\" alt=\"crates.io\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://docs.rs/tuple-traits/latest/tuple-traits\"\u003e\u003cimg src=\"https://img.shields.io/docsrs/tuple-traits\" alt=\"docs.rs\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/andogq/tuple-traits/actions/workflows/checks.yml\"\u003e\u003cimg src=\"https://github.com/andogq/tuple-traits/actions/workflows/checks.yml/badge.svg\" alt=\"checks\" /\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n# Traits\n\n## [`Append`](https://docs.rs/tuple-traits/latest/tuple-traits/trait.Append.html)\n\nAppend a type to a tuple.\n\n```rust\nstatic_assertions::assert_type_eq_all!(\n    \u003c(usize, char) as tuple_traits::Append\u003e::Append\u003cbool\u003e,\n    (usize, char, bool)\n);\n```\n\n## [`Cons`](https://docs.rs/tuple-traits/latest/tuple-traits/trait.Cons.html)\n\nRepresent a tuple as a cons (*ish*) value, with the first value on the left, and the rest of the\ntuple on the right.\n\n```rust\nstatic_assertions::assert_impl_all!(\n    (usize, usize, usize): tuple_traits::Cons\u003cLeft = usize, Right = (usize, usize)\u003e\n);\n```\n\n## [`Contains`](https://docs.rs/tuple-traits/latest/tuple-traits/trait.Contains.html)\n\nA trait that will only be implement for a given target if it is present within a given type.\n\n```rust\nstruct A;\nstruct B;\nstruct C;\n\nfn requires_c\u003cT, Index\u003e(value: T)\nwhere\n    T: tuple_traits::Contains\u003cC, Index\u003e\n{\n}\n\n// Works!\nrequires_c((A, B, C));\n\n// Compiler error: `C` does not appear within `(A, B)`\n// requires_c((A, B));\n```\n\n# Example\n\nCheck out [`./examples/buffer-flags.rs`](./examples/buffer-flags.rs) for a full example!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandogq%2Ftuple-traits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandogq%2Ftuple-traits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandogq%2Ftuple-traits/lists"}