Provide a .windows type interface

Open
#2 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
rust
Domain
devtools

Research direction

No file or test is named in the issue. Start by reading the existing iterator adapter's public API and tests, then define the consuming behavior and interface for windows and peek_window; done means the API and its semantics are unambiguous and covered by tests.

Written by the indexing model from the issue text.

Description

It would be useful if you could either use .windows like you could in a regular iterator, windows may or may not be consuming (I would assume regular windows should be consuming like calling .next). Also the ability to peek at windows, a useful interface would be something like:

let mut iter = bytes.iter().peekable();

while let Some(window) = iter.peek_window::<4>() {

This would be pretty useful for parsers as one use case.

Dominant language
Rust
Stars
28
Forks
3
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.