{"id":24488517,"url":"https://github.com/codx-dev/borrown","last_synced_at":"2025-08-20T15:02:46.864Z","repository":{"id":43857749,"uuid":"459768087","full_name":"codx-dev/borrown","owner":"codx-dev","description":"Borrowed or owned, simplified for no-std.","archived":false,"fork":false,"pushed_at":"2022-02-15T22:26:17.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T05:57:47.078Z","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/codx-dev.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}},"created_at":"2022-02-15T22:17:57.000Z","updated_at":"2022-02-15T22:26:18.000Z","dependencies_parsed_at":"2022-09-06T10:00:58.918Z","dependency_job_id":null,"html_url":"https://github.com/codx-dev/borrown","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/codx-dev%2Fborrown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codx-dev%2Fborrown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codx-dev%2Fborrown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codx-dev%2Fborrown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codx-dev","download_url":"https://codeload.github.com/codx-dev/borrown/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243663577,"owners_count":20327306,"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":"2025-01-21T16:19:54.296Z","updated_at":"2025-03-15T00:15:10.401Z","avatar_url":"https://github.com/codx-dev.png","language":"Rust","readme":"# Borrown - Borrowed or owned, simplified for no-std.\n\n[![crates.io](https://img.shields.io/crates/v/borrown?label=latest)](https://crates.io/crates/borrown)\n[![Documentation](https://docs.rs/borrown/badge.svg)](https://docs.rs/borrown/)\n[![License](https://img.shields.io/crates/l/borrown.svg)]()\n\nBorrow or owned, inspired by [Cow](https://doc.rust-lang.org/std/borrow/enum.Cow.html).\n\nProvide common trait implementations over `T`.\n\n## Example\n\n```rust\nuse borrown::Borrown;\n\n#[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord)]\nstruct Foo {\n    pub _val: usize,\n}\n\nlet x = Foo { _val: 0 };\nlet b = Borrown::Borrowed(\u0026x);\n\nlet _: \u0026Foo = b.as_ref();\nlet _: \u0026mut Foo = b.clone().as_mut();\nlet _: Borrown\u003c'_, Foo\u003e = Default::default();\nlet _: usize = *b;\nlet _: bool = b == Borrown::Borrowed(\u0026x);\nlet _: bool = b \u003c= Borrown::Borrowed(\u0026x);\nlet _: Borrown\u003c'_, Foo\u003e = b.clone();\nlet _: Foo = b.into_owned();\n\nprintln!(\"{:?}\", Borrown::Borrowed(\u0026x));\n\nimpl core::ops::Deref for Foo {\n    type Target = usize;\n\n    fn deref(\u0026self) -\u003e \u0026usize {\n        \u0026self._val\n    }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodx-dev%2Fborrown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodx-dev%2Fborrown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodx-dev%2Fborrown/lists"}