Skip to documentation
SLOP

tiny.acp.ReaderPoll

Reference tiny.acp ReaderPoll

Defined in tiny.acp.

A caller's read loop switches on this result to handle a line, read more input, or stop.

API (3)

Fields and members

Public fields and members.

No direct callersNo direct callstiny.acpReaderPoll
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: lib/acp/src/reader/storage.zig:14

zig
/// A caller's read loop switches on this result to handle a line, read more input, or stop. The/// union holds the result of one poll: a whole line, a request for more input, or the end of input./// The client's read loop and another program's server loop both switch on it.pub const Poll = union(enum) {    /// Carries one line without its newline, as a slice of the reader's buffer. The slice also    /// holds the last bytes of the input when it ends without a newline. The reader splits at `\n`    /// alone and keeps a carriage return before it. The slice remains valid until the next call to    /// `writable`, which moves the unread bytes, or to `deinit`.    line: []const u8,    /// Signals that no whole line is buffered yet. The caller reads more input into `writable` and    /// passes the count to `commit`, or calls `finish` at the end of input.    need_input,    /// Signals that the input has ended and every byte has been returned. Later polls return it    /// again.    end,};

Source: lib/acp/src/root.zig:89

zig
pub const ReaderPoll = reader.Poll;

Also reachable as

reader.Poll.

Audit

Definitions1
Public names2
Members3
Version26.7.0
Revisiondaab053ee433