Skip to main content

Module base

Module base 

Source
Expand description

One object-safe polling contract for device I/O.

Traits§

BaseOperations
Device operations return Poll directly, including read. Pending requires race-free waker registration and must not hide consumed bytes. Never retain caller buffers or task-context pointers. Device-owned state belongs in the opening context (or the device for context-free implementations).
DirectBaseOperations
Device operations return Poll directly, including read. Pending requires race-free waker registration and must not hide consumed bytes. Never retain caller buffers or task-context pointers. Device-owned state belongs in the opening context (or the device for context-free implementations).

Functions§

open_close_operation
ready
Complete an intrinsically synchronous backend operation with the polling contract. The closure runs exactly once; busy errors remain errors.