pub enum PollMode {
Block,
Spawn,
Rayon,
AsyncInline,
AsyncSpawn,
}Expand description
WHERE one poll entry’s tick runs — the mandatory word, and the whole of the vocabulary.
§A closed unit enum, and the framework-open law is why rather than an exception
The five words are the 2×2 of WORLD (sync / async) by PLACE (here / elsewhere), plus the one
engine that earned a word of its own. What is OPEN is the ENGINE behind each detached word —
Spawn and AsyncSpawn are seams a third-party pool implements and a deployment
installs — so a new executor costs no word here. That is the same division the store engines
keep: the vocabulary is the grammar’s, the implementation is the seam’s.
Variants§
Block
block — sync, ON THE DRIVER’S OWN THREAD. The tick’s answer reaches the taps.
Spawn
spawn — sync, DETACHED to a thread (the shipped Thread citizen).
Rayon
rayon — sync, DETACHED to rayon’s pool (the shipped Rayon citizen, behind the runtime
crate’s rayon feature).
AsyncInline
async(inline) — AWAITED in the driver’s loop. Today’s behaviour, now said out loud.
AsyncSpawn
async(spawn) — DETACHED as a task on whichever AsyncSpawn the deployment installed.
Implementations§
Source§impl PollMode
impl PollMode
Sourcepub const ALL: [Self; 5]
pub const ALL: [Self; 5]
Every mode, in the order a refusal offers them — the two INLINE roads first, because they are the ones an entry with no handler may take.
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
The word a declaration writes, and the word a refusal names.
Sourcepub const fn blocking(self) -> bool
pub const fn blocking(self) -> bool
Whether the body is SYNC — which decides whether the mount’s bound is Tick or
AsyncTick, and which write family a granted store is reached through.