#reader #buffered #markable

markable_reader

Provides a reader which can be marked in a position to be returned to after subsequent reads

5 stable releases

2.1.1 Dec 12, 2023
2.1.0 Sep 12, 2023
2.0.0 Sep 12, 2023
1.1.0 Jul 28, 2023
1.0.0 Jul 28, 2023

#204 in Memory management

27 downloads per month

MIT license

32KB
628 lines

Markable Stream

A Markable Stream functions as an ordinary reader with the added ability to mark a stream at an arbitrary location that can be returned to after subsequent reads. There are two variants in this package: 1) Markable Stream; and 2) Buffered Markable Stream.

Usage

Usage is the same as with any other std::io::Read trait, with the exception of two additional functions: mark() and reset(), which mark the location of the stream to return to at a later point and reset the stream back to that position respectively.

No runtime deps