{"id":33932955,"url":"https://github.com/lbfalvy/bound","last_synced_at":"2026-03-17T20:05:22.284Z","repository":{"id":61252888,"uuid":"549710705","full_name":"lbfalvy/bound","owner":"lbfalvy","description":"encapsulate the act of deriving a struct from a reference","archived":false,"fork":false,"pushed_at":"2025-02-14T18:14:36.000Z","size":19,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-13T23:41:02.314Z","etag":null,"topics":["crate","memory-management","rust","rust-patterns"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/bound","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/lbfalvy.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-10-11T16:00:32.000Z","updated_at":"2025-11-18T06:46:01.000Z","dependencies_parsed_at":"2025-12-12T16:10:41.238Z","dependency_job_id":null,"html_url":"https://github.com/lbfalvy/bound","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/lbfalvy/bound","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbfalvy%2Fbound","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbfalvy%2Fbound/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbfalvy%2Fbound/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbfalvy%2Fbound/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lbfalvy","download_url":"https://codeload.github.com/lbfalvy/bound/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbfalvy%2Fbound/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30630046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T17:32:55.572Z","status":"ssl_error","status_checked_at":"2026-03-17T17:32:38.732Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["crate","memory-management","rust","rust-patterns"],"created_at":"2025-12-12T13:00:38.143Z","updated_at":"2026-03-17T20:05:22.255Z","avatar_url":"https://github.com/lbfalvy.png","language":"Rust","readme":"# Bound\n\nA minimal crate to encapsulate the act of deriving a struct from a reference. Notably useful\nfor wrapping `LockGuard` instances obtained from `Arc\u003cRwLock\u003cT\u003e\u003e` for example, but essentially\nworks with anything that has a similar relation as the LockGuard does to the RwLock.\n\n## Usage\n\nThis and all other examples are also available on [https:://docs.rs/bound][docs]\n\n```rs\nuse std::sync::{Arc, RwLock};\nuse bound::Bound;\n\nlet shared = Arc::new(RwLock::new(1));\nlet mut writer = Bound::try_new(shared.clone(), |a| a.write()).expect(\"Failed to lock\");\n*writer = 2;\n\n// writer now has the following type\ntype Writer = Bound\u003cRwLockWriteGuard\u003c'static, usize\u003e, Arc\u003cRwLock\u003cusize\u003e\u003e\u003e\n```\n\nYou can now safely pass `writer` around and put it in structs, something you couldn't do with an\n`RwLockWriteGuard` by default because it's derived from the local reference to its lock.\n\n## 1.0?\n\n1.0 means robust, verified and ready for production use. This package is as robust as I can make \nit, but it uses unsafe code, so I'd like at least 5 experienced Rust developers to approve of it.\nIf you're comfortable with unsafe code and you believe the code to be secure, please send me an\nemail.\n\nAs always, if you found a way to break it please open an issue with a reproducible example.\n\nAuthoritative Approvals: 1\n\n[docs]: https://docs.rs/bound/0.2.1/bound/struct.Bound.html","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flbfalvy%2Fbound","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flbfalvy%2Fbound","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flbfalvy%2Fbound/lists"}