{"id":15137849,"url":"https://github.com/bevyengine/atomicow","last_synced_at":"2025-04-05T22:04:12.591Z","repository":{"id":254931275,"uuid":"847928647","full_name":"bevyengine/atomicow","owner":"bevyengine","description":"A `Cow`-like data structure where owned data is stored inside an `Arc`.","archived":false,"fork":false,"pushed_at":"2025-03-21T04:25:55.000Z","size":35,"stargazers_count":29,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T21:02:57.120Z","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/bevyengine.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-26T20:12:30.000Z","updated_at":"2025-03-21T04:23:07.000Z","dependencies_parsed_at":"2024-08-27T02:41:15.995Z","dependency_job_id":"067dfdf3-1ce7-45bd-8ed1-09f8648a4ea3","html_url":"https://github.com/bevyengine/atomicow","commit_stats":{"total_commits":16,"total_committers":3,"mean_commits":5.333333333333333,"dds":0.5625,"last_synced_commit":"c3306d03175177ac12fa43cb9d59064ec18958a4"},"previous_names":["bevyengine/atomicow"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bevyengine%2Fatomicow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bevyengine%2Fatomicow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bevyengine%2Fatomicow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bevyengine%2Fatomicow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bevyengine","download_url":"https://codeload.github.com/bevyengine/atomicow/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247406085,"owners_count":20933803,"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-09-26T07:02:41.944Z","updated_at":"2025-04-05T22:04:12.566Z","avatar_url":"https://github.com/bevyengine.png","language":"Rust","readme":"\u003cdiv class=\"rustdoc-hidden\"\u003e\n\n# `atomicow`\n\n\u003c/div\u003e\n\n![License](https://img.shields.io/badge/license-MIT%2FApache-blue.svg)\n[![Crates.io](https://img.shields.io/crates/v/atomicow.svg)](https://crates.io/crates/atomicow)\n[![Downloads](https://img.shields.io/crates/d/atomicow.svg)](https://crates.io/crates/atomicow)\n[![Docs](https://docs.rs/atomicow/badge.svg)](https://docs.rs/atomicow/latest/atomicow/)\n\nA [`Cow`](https://doc.rust-lang.org/std/borrow/enum.Cow.html)-like data structure where owned data is stored inside an [`Arc`](https://doc.rust-lang.org/std/sync/struct.Arc.html).\nHere's what it looks like:\n\n```rust, ignore\npub enum CowArc\u003c'a, T: ?Sized + 'static\u003e {\n    Borrowed(\u0026'a T),\n    Static(\u0026'static T),\n    Owned(Arc\u003cT\u003e),\n}\n```\n\nAs implied by the `Cow` name, this type allows for cheap immutable reference, but can be converted into a shared owned form via cloning when lifetime extension is required.\n\nThis data structure is particularly useful for `str` or other values with a static lifetime,\nas might be used in structures such as asset paths.\nA `'static str` stored in a `CowArc` can be cloned without allocations or bookkeeping,\nwhile owned values are shared by reference-counting in a thread-safe fashion.\n\n## Comparison to the `cow_arc` crate\n\nThe similar [`cow_arc`](https://docs.rs/cow_arc/latest/cow_arc/) crate already exists.\nHow does `atomicow` differ?\n\nPut simply: `cow_arc`'s data structure is just a wrapper over an `Arc`.\nWhile this is exactly what you need in some use cases,\nthe enum structure used in `atomicow` is both more transparent and more flexible.\n\n## Contributing\n\nThis crate is maintained by the Bevy organization, and is intended to be tiny, stable, zero-dependency, and broadly useful.\n[Issues](https://github.com/bevyengine/atomicow/issues) and [pull requests](https://github.com/bevyengine/atomicow/pulls) are genuinely welcome!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbevyengine%2Fatomicow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbevyengine%2Fatomicow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbevyengine%2Fatomicow/lists"}