ProtoCore v0.0.1
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
pc_cspan Struct Reference

A read-only byte region. More...

#include <span.h>

Public Attributes

const uint8_t * buf
 first byte, or nullptr when there is nothing to read
 
size_t len
 readable bytes at buf (0 whenever buf is nullptr)
 
size_t pos
 read cursor
 
bool err
 sticky: a read ran past len
 

Detailed Description

A read-only byte region.

Field names match the bytes.h read-cursor convention ({const uint8_t *buf; size_t len; size_t pos; bool err;}), so pc_br_init() / pc_br_take_be() apply unchanged.

Definition at line 78 of file span.h.

Member Data Documentation

◆ buf

const uint8_t* pc_cspan::buf

first byte, or nullptr when there is nothing to read

Definition at line 80 of file span.h.

Referenced by pc_cspan_from(), and pc_cspan_ok().

◆ len

size_t pc_cspan::len

readable bytes at buf (0 whenever buf is nullptr)

Definition at line 81 of file span.h.

Referenced by pc_cspan_from().

◆ pos

size_t pc_cspan::pos

read cursor

Definition at line 82 of file span.h.

Referenced by pc_cspan_from().

◆ err

bool pc_cspan::err

sticky: a read ran past len

Definition at line 83 of file span.h.

Referenced by pc_cspan_from(), and pc_cspan_ok().


The documentation for this struct was generated from the following file: