windowed-infinity 0.2.0

A data structure representing an infinite sequentially writable u8 vector of which a small view has writes to it preserved. This is primarily useful when implementing CoAP block-wise transfers, and also convenient for logging on constrained devices.
Documentation
# windowed-infinity ![License: MIT OR Apache-2.0](https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue) [![windowed-infinity on crates.io](https://img.shields.io/crates/v/windowed-infinity)](https://crates.io/crates/windowed-infinity) [![windowed-infinity on docs.rs](https://docs.rs/windowed-infinity/badge.svg)](https://docs.rs/windowed-infinity) [![Source Code Repository](https://img.shields.io/badge/Code-On%20Codeberg-blue?logo=Codeberg)](https://codeberg.org/chrysn/windowed-infinity) ![Rust Version: 1.82.0](https://img.shields.io/badge/rustc-1.82.0-orange.svg)

This crate provides the [WindowedInfinity][__link0] struct, which is written to through its methods or
[`embedded_io::Write`][__link1].

Its purpose is to wrap a small buffer such that writes to it advance a cursor over a larger
imaginary buffer, only persisting writes to the small buffer. After the buffer has been
processed, a new WindowedInfinity can be set up and the writing process repeated. This is
wasteful when the writes are computationally expensive, but convenient when operations only
rarely exceed the buffer.

A typical practical example of a WindowedInfinity application is the implementation of CoAP
block-wise transfer according to [RFC7959][__link2]; a simpler
example is available in the `demo.rs` example.

### Related crates

This crate provides the bare minimum functionality of Doing One Thing (hopefully) Right. Before
adopting [`embedded_io::Write`][__link3] as The Interface to this crate, it used to provide a `Tee`
adapter (now in [`tee-embedded-io`][__link4]) as well as implementing other `Write` traits or providing
a compatible implementation into hashes and CRCs (now in [`extra-embedded-io-adapters`][__link5]). Those
crates can be combined, for example, to build a combined writer that hashes its text input
while preserving only a small portion in memory, thus allowing checked recombination of the
parts (e.g. to provide an ETag value in CoAP block-wise transfer).


 [__cargo_doc2readme_dependencies_info]: ggGkYW0CYXSEG_W_Gn_kaocAGwCcVPfenh7eGy6gYLEwyIe4G6-xw_FwcbpjYXKEG-QA5pJiHJtyG20EtJUwOWkgG80ucTI0lBE9G97W67Uu6YFgYWSCgmtlbWJlZGRlZF9pb2UwLjcuMYNxd2luZG93ZWQtaW5maW5pdHllMC4yLjBxd2luZG93ZWRfaW5maW5pdHk
 [__link0]: https://docs.rs/windowed-infinity/0.2.0/windowed_infinity/struct.WindowedInfinity.html
 [__link1]: https://docs.rs/embedded_io/0.7.1/embedded_io/?search=Write
 [__link2]: https://tools.ietf.org/html/rfc7959
 [__link3]: https://docs.rs/embedded_io/0.7.1/embedded_io/?search=Write
 [__link4]: `tee-embedded-io`
 [__link5]: `extra-embedded-io-adapters`