{"id":18995431,"url":"https://github.com/shiritai/limited-queue","last_synced_at":"2025-07-03T02:05:44.532Z","repository":{"id":247416345,"uuid":"825791534","full_name":"Shiritai/limited-queue","owner":"Shiritai","description":"Rust implementation of limited queue library: A circular queue that overrides the oldest element if trying to push data when queue is full","archived":false,"fork":false,"pushed_at":"2024-07-12T19:07:46.000Z","size":20,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-03T02:05:36.847Z","etag":null,"topics":["circular-queue","crate","limited-queue","rust-library"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/limited-queue","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/Shiritai.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":"2024-07-08T14:00:34.000Z","updated_at":"2024-12-23T17:22:37.000Z","dependencies_parsed_at":"2024-11-08T17:43:16.151Z","dependency_job_id":null,"html_url":"https://github.com/Shiritai/limited-queue","commit_stats":null,"previous_names":["shiritai/limited-queue"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Shiritai/limited-queue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shiritai%2Flimited-queue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shiritai%2Flimited-queue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shiritai%2Flimited-queue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shiritai%2Flimited-queue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shiritai","download_url":"https://codeload.github.com/Shiritai/limited-queue/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shiritai%2Flimited-queue/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263245316,"owners_count":23436513,"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":["circular-queue","crate","limited-queue","rust-library"],"created_at":"2024-11-08T17:30:32.097Z","updated_at":"2025-07-03T02:05:44.481Z","avatar_url":"https://github.com/Shiritai.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Limited Queue\n\n[![Crates.io Version](https://img.shields.io/crates/v/limited-queue.svg)](https://crates.io/crates/limited-queue)\n![GitHub top language](https://img.shields.io/github/languages/top/Shiritai/limited-queue)\n![GitHub CI Status](https://img.shields.io/github/actions/workflow/status/Shiritai/limited-queue/.github/workflows/ci.yml)\n[![Crates.io Downloads](https://img.shields.io/crates/d/limited-queue.svg)](https://crates.io/crates/limited-queue)\n[![License](https://img.shields.io/github/license/Shiritai/limited-queue)](LICENSE)\n\nA circular queue that overrides the oldest data if trying to push a data when the queue is full.\n\nAll operations are of **`O(1)`** complexity, except the constructor with `O(Vec::with_capacity)`.\n\nThe optional method `pop` is provided when `T` satisfies trait bound `Default`.\n\n## Comparison\n\nThere is a similar library [`circular-queue`](https://github.com/YaLTeR/circular-queue) I found, but without the basic `peek` and `pop` operations. The comparison for now is listed below:\n\n||[`LimitedQueue`](https://github.com/Shiritai/limited-queue)| [`circular-queue`](https://github.com/YaLTeR/circular-queue) |\n|:-:|:-|:-|\n|Algorithm|circular queue (front-rear, without additional element slot)|circular queue (based on `len` and `capacity` provided by `Vec`)|\n|Element trait bound needed|No, optionally `Default` for `pop` method|-|\n|`push`, size-related methods|✅|✅|\n|`peek`, `pop` support|✅: `peek`\u003cbr\u003e✅: `pop` for `T: Default`|❌|\n|Indexing|✅\u003cbr\u003e- `[0, len)`\u003cbr\u003e- support `[idx]`\u003cbr\u003e- support `get(idx)`\u003cbr\u003e- optionally mutable (`[idx]`)|❌|\n|Iterator|✅\u003cbr\u003e- front to rear|✅\u003cbr\u003e- both ways\u003cbr\u003e- optionally mutable|\n|`clear` complexity|`O(1)`|`O(Vec::clear)`|\n|`serde` support|❌ (TODO)|✅|\n\nWe welcome any kinds of contributions, please don't be hesitate to submit issues \u0026 PRs.\n\n## Setup\n\nPlease run `scripts/setup.sh` to setup for committing. Currently, the script registers a git pre-commit hook.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshiritai%2Flimited-queue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshiritai%2Flimited-queue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshiritai%2Flimited-queue/lists"}