ReasonChip Streams
This module provides ReasonChips for handling standard input (stdin),
standard output (stdout), and standard error (stderr) using bytes.
reasonchip.streams.read_stdin
Read up to max_bytes from stdin as bytes.
Request Parameters
| Field | Type | Description |
|---|
| max_bytes | | Maximum number of bytes to read from stdin. |
Response
| Field | Type | Description |
|---|
| data | | Bytes read from stdin. |
reasonchip.streams.write_stdout
Write bytes to stdout.
Request Parameters
| Field | Type | Description |
|---|
| data | | Bytes to write to stdout. |
Response
| Field | Type | Description |
|---|
| success | | Indicates if writing to stdout was successful. |
reasonchip.streams.write_stderr
Write bytes to stderr.
Request Parameters
| Field | Type | Description |
|---|
| data | | Bytes to write to stderr. |
Response
| Field | Type | Description |
|---|
| success | | Indicates if writing to stderr was successful. |
reasonchip.streams.print_stdout
Print a message to stdout.
Request Parameters
| Field | Type | Description |
|---|
| message | | The message to print to stdout. |
Response
| Field | Type | Description |
|---|
| success | | Indicates if the print operation was successful. |
reasonchip.streams.read_bytes
Read up to max_bytes from stdin as bytes.
Request Parameters
| Field | Type | Description |
|---|
| max_bytes | | Maximum number of bytes to read from stdin. |
Response
| Field | Type | Description |
|---|
| data | | Bytes read from stdin. |
reasonchip.streams.read_line
Read a single line from stdin as bytes.
Request Parameters
| Field | Type | Description |
|---|
| max_bytes | | Maximum number of bytes to read from stdin in a single line. |
Response
| Field | Type | Description |
|---|
| data | | A single line read from stdin as bytes. |