pub struct ProcessInput { /* private fields */ }Expand description
Bounded, cloneable input for one ProcessSubscription run.
Keep this handle in the model and pass a clone to ProcessSubscription::stdin
each time subscriptions() is rebuilt. Clones share one queue and identity.
A fresh handle is required to start another process run. Dropping a clone
does not close input; call close to request EOF.
Sending never waits for pipe I/O or queue capacity. At most
PROCESS_INPUT_CAPACITY lines are queued, plus one being written, each
limited to MAX_PROCESS_LINE_BYTES bytes. Acceptance means queued, not
acknowledged by the child; stop, exit, or I/O failure can discard pending
input. A worker writes accepted lines in FIFO order with an appended LF.
Implementations§
Source§impl ProcessInput
impl ProcessInput
Sourcepub fn try_send_line(&self, line: String) -> Result<(), ProcessInputError>
pub fn try_send_line(&self, line: String) -> Result<(), ProcessInputError>
Queue UTF-8 text followed by LF, preserving any embedded newlines.
Returns the unchanged text on rejection. Oversized input is checked before queue state. The short state lock never covers child I/O.