{"id":17279721,"url":"https://github.com/str4d/hazmat","last_synced_at":"2025-08-20T09:18:20.368Z","repository":{"id":56861942,"uuid":"503954832","full_name":"str4d/hazmat","owner":"str4d","description":"A collection of helpers for working with hazardous materials in Rust crates.","archived":false,"fork":false,"pushed_at":"2022-06-16T17:19:41.000Z","size":15,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T22:43:30.264Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/str4d.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}},"created_at":"2022-06-15T23:52:17.000Z","updated_at":"2023-07-19T16:15:27.000Z","dependencies_parsed_at":"2022-09-16T19:21:48.236Z","dependency_job_id":null,"html_url":"https://github.com/str4d/hazmat","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/str4d%2Fhazmat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/str4d%2Fhazmat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/str4d%2Fhazmat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/str4d%2Fhazmat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/str4d","download_url":"https://codeload.github.com/str4d/hazmat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248854727,"owners_count":21172406,"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":"2024-10-15T09:18:23.620Z","updated_at":"2025-04-14T09:35:34.490Z","avatar_url":"https://github.com/str4d.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `hazmat` Rust library\n\nA collection of helpers for working with hazardous materials in Rust crates.\n\n## `#[hazmat::suit]`\n\nEver needed to expose an internal trait for downstream users to implement, that\nshouldn't be usable outside of your crate? Add the `#[hazmat::suit]` attribute\nto the trait and it becomes \"implement-only\":\n\n```rust\n#[hazmat::suit]\npub trait LowLevel {\n    fn low_level(self) -\u003e bool;\n}\n\nstruct DownstreamType;\n\n#[hazmat::suit]\nimpl LowLevel for DownstreamType {\n    fn low_level(self, other: Self) -\u003e bool {\n        true\n    }\n}\n\nfn use_low_level() {\n    let a = DownstreamType;\n    let b = DownstreamType;\n\n    // This won't compile outside of the crate in which the trait is defined.\n    assert!(a.low_level(b, LowLevelCap));\n}\n```\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0, ([LICENSE-APACHE](../LICENSE-APACHE) or\n   http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](../LICENSE-MIT) or http://opensource.org/licenses/MIT)\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstr4d%2Fhazmat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstr4d%2Fhazmat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstr4d%2Fhazmat/lists"}