{"id":15373054,"url":"https://github.com/vi/slab_typesafe","last_synced_at":"2025-04-15T14:14:02.186Z","repository":{"id":57667600,"uuid":"115560289","full_name":"vi/slab_typesafe","owner":"vi","description":"A type-safe wrapper for Rust's \"slab\" data structure","archived":false,"fork":false,"pushed_at":"2019-01-07T17:00:58.000Z","size":12,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T21:03:11.764Z","etag":null,"topics":["rust","slab","typesafe"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-27T21:51:05.000Z","updated_at":"2022-09-09T10:07:18.000Z","dependencies_parsed_at":"2022-09-26T20:31:56.817Z","dependency_job_id":null,"html_url":"https://github.com/vi/slab_typesafe","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vi%2Fslab_typesafe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vi%2Fslab_typesafe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vi%2Fslab_typesafe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vi%2Fslab_typesafe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vi","download_url":"https://codeload.github.com/vi/slab_typesafe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248968739,"owners_count":21191158,"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":["rust","slab","typesafe"],"created_at":"2024-10-01T13:54:11.585Z","updated_at":"2025-04-15T14:14:02.161Z","avatar_url":"https://github.com/vi.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# slab_typesafe\nA type-safe wrapper from Rust's \"slab\" data structure\n\nPrevents using [slab](https://crates.io/crates/slab) with obviously wrong keys:\n\n```rust\n#[macro_use] \nextern crate slab_typesafe;\n\ndeclare_slab_token!(StringHandle1);\ndeclare_slab_token!(StringHandle2);\n\nlet mut slab1 : Slab\u003cStringHandle1, _\u003e = Slab::new();\nlet mut slab2 : Slab\u003cStringHandle2, _\u003e = Slab::new();\n\nlet hello = slab1.insert(\"hello\");\nlet world = slab2.insert(\"world\");\n\nslab1[world]; // the type `Slab\u003cStringHandle1, _\u003e` cannot be indexed by `StringHandle2`\nslab2.remove(hello); // expected struct `StringHandle2`, found struct `StringHandle1`\n```rust\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvi%2Fslab_typesafe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvi%2Fslab_typesafe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvi%2Fslab_typesafe/lists"}