Skip to main content

Module coroutine

Module coroutine 

Source
Expand description

§Generator-shape coroutine driver

Mirrors the shape of core::ops::Coroutine: a Yield associated type for intermediate progress, a Return associated type for terminal output, and a two-variant M2dirCoroutineState (Yielded / Complete).

io-m2dir is filesystem-flavoured, so every coroutine in the crate picks the standard M2dirYield directly: it gathers every filesystem (and environmental) primitive the crate emits, namely directory create / remove / read, file create / read / exists / remove, path rename, and the process id / random bytes inputs needed to mint m2dir entry identifiers.

M2dirClient::run drives any standard-Yield coroutine to completion against the local filesystem.

Enums§

M2dirArg
Reply fed back into M2dirCoroutine::resume by the driver.
M2dirCoroutineState
State yielded by an M2dirCoroutine::resume step.
M2dirYield
Standard filesystem-only Yield. Every io-m2dir coroutine picks type Yield = M2dirYield.

Traits§

M2dirCoroutine
Standard-shape m2dir coroutine.