{"id":16677532,"url":"https://github.com/foresterre/peekmore","last_synced_at":"2025-04-06T01:08:09.194Z","repository":{"id":45804550,"uuid":"207378419","full_name":"foresterre/peekmore","owner":"foresterre","description":"👀 Multi-peek iterator (no-std)","archived":false,"fork":false,"pushed_at":"2024-12-10T22:33:02.000Z","size":111,"stargazers_count":26,"open_issues_count":9,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T19:08:47.072Z","etag":null,"topics":["hacktoberfest","iterator","iterator-library","multi-peek","multipeek","peek","peek-ahead","rust","rust-library"],"latest_commit_sha":null,"homepage":"https://docs.rs/peekmore","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/foresterre.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE-APACHE","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},"funding":{"github":["foresterre"],"buy_me_a_coffee":"foresterre","thanks_dev":"u/gh/foresterre"}},"created_at":"2019-09-09T18:34:43.000Z","updated_at":"2024-12-10T22:27:10.000Z","dependencies_parsed_at":"2024-10-12T13:26:46.773Z","dependency_job_id":"4727943a-2e31-4f0c-bc0e-19301733326f","html_url":"https://github.com/foresterre/peekmore","commit_stats":{"total_commits":92,"total_committers":9,"mean_commits":"10.222222222222221","dds":0.2934782608695652,"last_synced_commit":"2b8be1dbc5ba22c59d89f93d42abf2a37423631c"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foresterre%2Fpeekmore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foresterre%2Fpeekmore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foresterre%2Fpeekmore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foresterre%2Fpeekmore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foresterre","download_url":"https://codeload.github.com/foresterre/peekmore/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247419860,"owners_count":20936012,"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":["hacktoberfest","iterator","iterator-library","multi-peek","multipeek","peek","peek-ahead","rust","rust-library"],"created_at":"2024-10-12T13:26:44.515Z","updated_at":"2025-04-06T01:08:09.170Z","avatar_url":"https://github.com/foresterre.png","language":"Rust","funding_links":["https://github.com/sponsors/foresterre","https://buymeacoffee.com/foresterre","https://thanks.dev/u/gh/foresterre"],"categories":[],"sub_categories":[],"readme":"# peekmore\n\nThis crate introduces a multi-peekable iterator.\nThe iterator is similar to [core::iterator::Peekable](https://doc.rust-lang.org/core/iter/struct.Peekable.html). \nThe main difference is that Peekable only allows you to peek at the next element and no further.\nThis crate aims to take that limitation away.\n\nThe documentation and more extensive example usage can be found at [docs.rs/peekmore](https://docs.rs/peekmore/).\n\n### Usage example:\n\n```rust\nuse peekmore::PeekMore;\n\nfn main() {\n    let range10 = 0..11;\n    let mut peekable = range10.peekmore();\n    \n    // Peek at the first element\n    let peek_first = peekable.peek();\n    assert_eq!(*peek_first.unwrap(), 0);\n    \n    let peek_first_redux = peekable.peek_nth(0);\n    assert_eq!(*peek_first_redux.unwrap(), 0);\n    \n    // Peek at the 10th (index) element\n    let peek_tenth = peekable.peek_nth(10);\n    assert_eq!(*peek_tenth.unwrap(), 10);\n    \n    // Consume the 10th element\n    let tenth = peekable.nth(10);\n    assert_eq!(tenth.unwrap(), 10);\n    \n    // Show that there are no more elements\n    assert_eq!(peekable.peek(), None);\n    assert_eq!(peekable.next(), None);\n}\n\n```\n\n### License\n \nLicensed under either of\n\n* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n#### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the Apache-2.0\nlicense, shall be dual licensed as above, without any additional terms or\nconditions.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforesterre%2Fpeekmore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fforesterre%2Fpeekmore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforesterre%2Fpeekmore/lists"}