A buffer being read: its bytes, how far the reader has gone, and whether it ran out.
More...
#include <spatium.h>
A buffer being read: its bytes, how far the reader has gone, and whether it ran out.
- Note
- The read-only counterpart of mmgr_span. buf is const here. A span handed out for reading cannot be written through it.
-
err is sticky, for the same reason overflow is.
- Warning
- buf points at storage that must outlive every use of the span [BORROWS].
Definition at line 62 of file spatium.h.
◆ buf
| const uint8_t* mmgr_cspan::buf |
First byte, or NULL when there is nothing to read [BORROWS].
Definition at line 64 of file spatium.h.
◆ len
Readable bytes at buf.
Definition at line 65 of file spatium.h.
◆ pos
Bytes read so far.
Definition at line 66 of file spatium.h.
◆ err
| embed_bool mmgr_cspan::err |
Set once a read has run past len, and never cleared after.
Definition at line 67 of file spatium.h.
The documentation for this struct was generated from the following file: