{"id":15914888,"url":"https://github.com/michaelsproul/static_slice","last_synced_at":"2025-03-23T01:31:43.469Z","repository":{"id":25965513,"uuid":"29407426","full_name":"michaelsproul/static_slice","owner":"michaelsproul","description":"Rust macro for static slices.","archived":false,"fork":false,"pushed_at":"2017-04-05T00:00:13.000Z","size":2,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-07T17:20:16.896Z","etag":null,"topics":["rust","rust-macro"],"latest_commit_sha":null,"homepage":null,"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/michaelsproul.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":"2015-01-17T22:08:58.000Z","updated_at":"2017-04-05T00:00:42.000Z","dependencies_parsed_at":"2022-07-24T20:02:22.435Z","dependency_job_id":null,"html_url":"https://github.com/michaelsproul/static_slice","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelsproul%2Fstatic_slice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelsproul%2Fstatic_slice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelsproul%2Fstatic_slice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelsproul%2Fstatic_slice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michaelsproul","download_url":"https://codeload.github.com/michaelsproul/static_slice/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221841975,"owners_count":16890086,"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","rust-macro"],"created_at":"2024-10-06T17:20:29.163Z","updated_at":"2024-10-28T14:42:50.918Z","avatar_url":"https://github.com/michaelsproul.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Static Slice\n\nRust macro for succinctly creating static slices.\n\n## Usage\n\n```rust\nstatic_slice![\u003ctype\u003e: a1, a2, ..., an]\n```\n\n## Examples\n\n```rust\nlet bytes = static_slice![u8: 1, 3, 5, 7, 8];\n```\n\n```rust\nenum TruthValue {\n    Yes,\n    Maybe,\n    No\n}\n\nfn to_bools(x: TruthValue) -\u003e \u0026'static [bool] {\n    match x {\n        Yes =\u003e static_slice![true],\n        Maybe =\u003e static_slice![true, false],\n        No =\u003e static_slice![false]\n    }\n}\n```\n\n## License\n\nPublic domain. Go for it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelsproul%2Fstatic_slice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaelsproul%2Fstatic_slice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelsproul%2Fstatic_slice/lists"}