{"id":22901054,"url":"https://github.com/mpdn/disjoint-borrow","last_synced_at":"2025-05-08T01:44:36.586Z","repository":{"id":57619768,"uuid":"205722361","full_name":"mpdn/disjoint-borrow","owner":"mpdn","description":"Disjoint borrow of slices in Rust","archived":false,"fork":false,"pushed_at":"2019-09-01T20:23:23.000Z","size":10,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-08T01:44:30.894Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mpdn.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}},"created_at":"2019-09-01T19:24:46.000Z","updated_at":"2023-08-25T04:33:24.000Z","dependencies_parsed_at":"2022-09-26T17:51:15.419Z","dependency_job_id":null,"html_url":"https://github.com/mpdn/disjoint-borrow","commit_stats":null,"previous_names":["noctune/disjoint-borrow"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpdn%2Fdisjoint-borrow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpdn%2Fdisjoint-borrow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpdn%2Fdisjoint-borrow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpdn%2Fdisjoint-borrow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mpdn","download_url":"https://codeload.github.com/mpdn/disjoint-borrow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252983757,"owners_count":21835758,"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-12-14T01:31:28.178Z","updated_at":"2025-05-08T01:44:36.532Z","avatar_url":"https://github.com/mpdn.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/noctune/disjoint-borrow.svg?branch=master)](https://travis-ci.org/noctune/disjoint-borrow)\n\n# disjoint-borrow\n\nDisjoint borrows of slices.\n\nProvides the [`DisjointSlice`](struct.DisjointSlice.html) type, allowing disjoint borrows over\nslices by adding runtime checks. Immutable borrows are allowed to intersect with other immutable\nborrows, while mutable borrows may not intersect with any borrows.\n\nBorrow tracking is implemented as type-level list. This has the advantage that no allocation is\nnecessary, but also limits the number of disjoint borrows to a compile-time constant.\n\nNo-std compatible.\n\n## Example\n\n```rust\nuse disjoint_borrow::DisjointSlice;\n\nlet mut array = [1, 2, 3, 4, 5];\nlet mut ds = DisjointSlice::new(\u0026mut array);\nlet (mut ds, mut a) = ds.get_mut(0..2);\nlet (_, mut b) = ds.get_mut(3..5);\n\na[0] *= -1;\nb[1] *= -1;\n\nassert_eq!(a, \u0026[-1, 2]);\nassert_eq!(b, \u0026[4, -5]);\n```\n\nLicense: MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpdn%2Fdisjoint-borrow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmpdn%2Fdisjoint-borrow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpdn%2Fdisjoint-borrow/lists"}