{"id":18443203,"url":"https://github.com/mkroening/take-static","last_synced_at":"2025-04-07T23:31:47.265Z","repository":{"id":191180682,"uuid":"684151403","full_name":"mkroening/take-static","owner":"mkroening","description":"Static items that provide mutable access only once.","archived":false,"fork":false,"pushed_at":"2023-09-11T08:28:31.000Z","size":44,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-31T11:39:17.119Z","etag":null,"topics":["once","rust","singleton","static","sync","synchronization","take"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/take-static","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/mkroening.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-28T15:02:00.000Z","updated_at":"2023-11-07T02:29:17.000Z","dependencies_parsed_at":"2023-08-28T16:21:44.507Z","dependency_job_id":null,"html_url":"https://github.com/mkroening/take-static","commit_stats":null,"previous_names":["mkroening/take-static"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkroening%2Ftake-static","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkroening%2Ftake-static/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkroening%2Ftake-static/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkroening%2Ftake-static/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkroening","download_url":"https://codeload.github.com/mkroening/take-static/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223297255,"owners_count":17121974,"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":["once","rust","singleton","static","sync","synchronization","take"],"created_at":"2024-11-06T06:46:38.246Z","updated_at":"2024-11-06T06:46:38.865Z","avatar_url":"https://github.com/mkroening.png","language":"Rust","readme":"# take-static\n\n[![Crates.io](https://img.shields.io/crates/v/take-static)](https://crates.io/crates/take-static)\n[![docs.rs](https://img.shields.io/docsrs/take-static)](https://docs.rs/take-static)\n[![CI](https://github.com/mkroening/take-static/actions/workflows/ci.yml/badge.svg)](https://github.com/mkroening/take-static/actions/workflows/ci.yml)\n\nThis crate provides the [`take_static`] macro to create statics that provide mutable access only once:\n\n```rust\nuse take_static::take_static;\n\ntake_static! {\n    static NUMBER: usize = 5;\n}\n\nassert_eq!(NUMBER.take(), Some(\u0026mut 5));\nassert_eq!(NUMBER.take(), None);\n```\n\nFor API documentation, see the [docs].\n\n[`take_static`]: https://docs.rs/take-static/latest/take_static/macro.take_static.html\n[docs]: https://docs.rs/take-static\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0\n   ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license\n   ([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","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkroening%2Ftake-static","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkroening%2Ftake-static","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkroening%2Ftake-static/lists"}