{"id":21374831,"url":"https://github.com/banool/circular_vec","last_synced_at":"2025-03-16T09:20:55.232Z","repository":{"id":57603023,"uuid":"388959589","full_name":"banool/circular_vec","owner":"banool","description":null,"archived":false,"fork":false,"pushed_at":"2021-07-24T01:31:00.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-14T23:43:22.527Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/banool.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}},"created_at":"2021-07-24T00:24:40.000Z","updated_at":"2021-07-24T01:31:02.000Z","dependencies_parsed_at":"2022-09-12T19:31:34.227Z","dependency_job_id":null,"html_url":"https://github.com/banool/circular_vec","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/banool%2Fcircular_vec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/banool%2Fcircular_vec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/banool%2Fcircular_vec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/banool%2Fcircular_vec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/banool","download_url":"https://codeload.github.com/banool/circular_vec/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243848023,"owners_count":20357482,"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-11-22T08:45:41.216Z","updated_at":"2025-03-16T09:20:55.204Z","avatar_url":"https://github.com/banool.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Circular Vec\n\nThis provides a struct called CircularVec. It is a fixed length Vec that provides a `next` function, which iterates through the vec. When it hits the end, instead of returning None, we just loop back to the start.\n\nNote: This struct could use a lot of love. While I do have a need for this struct, and I use this for a personal project, this is also to become familiar with publishing a crate to crates.io. See the many ways this could be improved below.\n\n## Future work\n- This is likely not as efficient as it could be. We use Vec internally, which can grow, but we don't need that.\n- We could export a version of this that _can_ change size. Shrink semantics TBA.\n- This doesn't implement many traits that it could. See the traits that [Vec](https://doc.rust-lang.org/std/vec/struct.Vec.html) implements for inspiration.\n- The API could probably use some love, like exposing this as an iterator instead of providing a `next` function.\n- Probably much much more.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbanool%2Fcircular_vec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbanool%2Fcircular_vec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbanool%2Fcircular_vec/lists"}