{"id":24306693,"url":"https://github.com/tgrcdev/select_indices","last_synced_at":"2025-03-06T18:17:58.855Z","repository":{"id":57666567,"uuid":"427522151","full_name":"TGRCdev/select_indices","owner":"TGRCdev","description":"Rust crate for splitting slices and Vecs into multiple mutable references via a list of indices","archived":false,"fork":false,"pushed_at":"2022-08-08T19:32:40.000Z","size":98,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-28T09:48:30.610Z","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":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TGRCdev.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":"2021-11-12T23:25:37.000Z","updated_at":"2021-12-06T10:46:37.000Z","dependencies_parsed_at":"2022-09-26T20:31:50.771Z","dependency_job_id":null,"html_url":"https://github.com/TGRCdev/select_indices","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TGRCdev%2Fselect_indices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TGRCdev%2Fselect_indices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TGRCdev%2Fselect_indices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TGRCdev%2Fselect_indices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TGRCdev","download_url":"https://codeload.github.com/TGRCdev/select_indices/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242259915,"owners_count":20098429,"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-17T03:38:52.242Z","updated_at":"2025-03-06T18:17:58.833Z","avatar_url":"https://github.com/TGRCdev.png","language":"Rust","readme":"# select_indices\n\n![GitHub Workflow Status](https://img.shields.io/github/workflow/status/TGRCdev/select_indices/main)\n[![crates.io](https://img.shields.io/crates/v/select_indices.svg)](https://crates.io/crates/select_indices)\n[![docs.rs](https://img.shields.io/docsrs/select_indices)](https://docs.rs/select_indices)\n![Crates.io](https://img.shields.io/crates/l/select_indices)\n\n`select_indices` is a crate that provides iterators for seeking through a slice with a pre-made list of indices. It can simplify the readability of code and, in some cases, increase performance.\n\n[Documentation](https://docs.rs/select_indices)\u003cbr\u003e\n\n```rust\nuse select_indices::prelude::*;\n\nfn main()\n{\n    struct BankAccount {\n        pub name: String,\n        pub balance: f32,\n    }\n    \n    let mut vec: Vec\u003cBankAccount\u003e = vec![\n        BankAccount { name: \"Joey Bag o' Donuts\".to_string(), balance: 4.27 },\n        BankAccount { name: \"Henry Howard Roosevelt\".to_string(), balance: 83.20 },\n        BankAccount { name: \"Jenny Jenson\".to_string(), balance: 54.32 },\n        BankAccount { name: \"The Dude\".to_string(), balance: -134.01 },\n        // Assume there's like 300 of these\n    ];\n    \n    vec.select_indices_mut(\u0026[1, 3]).for_each(|account| {\n        account.balance -= 20.00;\n        println!(\"{} now has ${}\", account.name, account.balance);\n    });\n}\n```\n\nThere is also a `rayon` feature flag that provides ParallelIterator versions of `select_indices` iterators. In certain cases, these iterators can greatly improve performance over other methods of slice iteration.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftgrcdev%2Fselect_indices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftgrcdev%2Fselect_indices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftgrcdev%2Fselect_indices/lists"}