#infinity #coap #logging #vector #view #data #infinite

no-std windowed-infinity

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.

2 releases

0.1.1 Oct 22, 2020
0.1.0 Jan 22, 2019
Download history 89/week @ 2022-06-09 127/week @ 2022-06-16 159/week @ 2022-06-23 81/week @ 2022-06-30 106/week @ 2022-07-07 126/week @ 2022-07-14 191/week @ 2022-07-21 223/week @ 2022-07-28 493/week @ 2022-08-04 444/week @ 2022-08-11 447/week @ 2022-08-18 268/week @ 2022-08-25 247/week @ 2022-09-01 372/week @ 2022-09-08 445/week @ 2022-09-15 679/week @ 2022-09-22

1,775 downloads per month
Used in 7 crates (2 directly)


122 lines


This crate provides the [WindowedInfinity] struct and implementations of various traits to write to it.

Its primary 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 WindowedInfinity application is the implementation of CoAP block-wise transfer according to RFC7959; a simpler example is available in the demo.rs example.