{"id":22415814,"url":"https://github.com/xmas7/owning-ref-rs","last_synced_at":"2025-03-27T04:18:46.197Z","repository":{"id":143167441,"uuid":"533097703","full_name":"xmas7/owning-ref-rs","owner":"xmas7","description":"A library for creating references that carry their owner with them.","archived":false,"fork":false,"pushed_at":"2022-09-06T00:03:57.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T09:27:57.792Z","etag":null,"topics":["library","own","ref","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xmas7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-09-06T00:01:21.000Z","updated_at":"2024-05-20T11:11:39.000Z","dependencies_parsed_at":"2023-06-02T17:15:44.013Z","dependency_job_id":null,"html_url":"https://github.com/xmas7/owning-ref-rs","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/xmas7%2Fowning-ref-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmas7%2Fowning-ref-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmas7%2Fowning-ref-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmas7%2Fowning-ref-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xmas7","download_url":"https://codeload.github.com/xmas7/owning-ref-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245779486,"owners_count":20670688,"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":["library","own","ref","rust"],"created_at":"2024-12-05T15:13:45.508Z","updated_at":"2025-03-27T04:18:46.185Z","avatar_url":"https://github.com/xmas7.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"owning-ref-rs\n==============\n\n[![Travis-CI Status](https://travis-ci.org/Kimundi/owning-ref-rs.png?branch=master)](https://travis-ci.org/Kimundi/owning-ref-rs)\n\nA library for creating references that carry their owner with them.\n\nFor more details, see the [docs](http://kimundi.github.io/owning-ref-rs/owning_ref/index.html).\n\n# Getting Started\n\n[owning-ref-rs is available on crates.io](https://crates.io/crates/owning_ref).\nAdd the following dependency to your Cargo manifest to get the latest version of the 0.1 branch:\n```\n[dependencies]\n\nowning_ref = \"0.1.*\"\n```\n\nTo always get the latest version, add this git repository to your\nCargo manifest:\n\n```\n[dependencies.owning_ref]\ngit = \"https://github.com/Kimundi/owning-ref-rs\"\n```\n# Example\n\n```rust\nextern crate owning_ref;\nuse owning_ref::RcRef;\n\nfn main() {\n    // Let's create a few reference counted slices that point to the same memory:\n\n    let rc: RcRef\u003c[i32]\u003e = RcRef::new(Rc::new([1, 2, 3, 4]) as Rc\u003c[i32]\u003e);\n    assert_eq!(\u0026*rc, \u0026[1, 2, 3, 4]);\n\n    let rc_a: RcRef\u003c[i32]\u003e = rc.clone().map(|s| \u0026s[0..2]);\n    let rc_b = rc.clone().map(|s| \u0026s[1..3]);\n    let rc_c = rc.clone().map(|s| \u0026s[2..4]);\n    assert_eq!(\u0026*rc_a, \u0026[1, 2]);\n    assert_eq!(\u0026*rc_b, \u0026[2, 3]);\n    assert_eq!(\u0026*rc_c, \u0026[3, 4]);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmas7%2Fowning-ref-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxmas7%2Fowning-ref-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmas7%2Fowning-ref-rs/lists"}