Borrower-facing operation table for the stream port.
More...
#include <stream_types.h>
Data Fields | |
| size_t(* | read )(stream_t *s, void *buf, size_t n, stream_status_t *st) |
| Read bytes from a stream. | |
| size_t(* | write )(stream_t *s, const void *buf, size_t n, stream_status_t *st) |
| Write bytes to a stream. | |
| stream_status_t(* | flush )(stream_t *s) |
| Flush a stream. | |
A stream_ops_t groups the default borrower-visible runtime operations exposed by the public stream port.
Definition at line 76 of file stream_types.h.
| stream_status_t(* stream_ops_t::flush) (stream_t *s) |
| [in] | s | Stream handle to flush. |
Definition at line 126 of file stream_types.h.
| size_t(* stream_ops_t::read) (stream_t *s, void *buf, size_t n, stream_status_t *st) |
| [in] | s | Stream handle to read from. |
| [out] | buf | Destination buffer receiving up to n bytes. |
| [in] | n | Maximum number of bytes to read. |
| [out] | st | Optional status output. |
Definition at line 95 of file stream_types.h.
| size_t(* stream_ops_t::write) (stream_t *s, const void *buf, size_t n, stream_status_t *st) |
| [in] | s | Stream handle to write to. |
| [in] | buf | Source buffer containing up to n bytes to write. |
| [in] | n | Maximum number of bytes to write. |
| [out] | st | Optional status output. |
Definition at line 115 of file stream_types.h.