Skip to main content

ready_now

Function ready_now 

Source
pub fn ready_now<T, E: From<Error>>(
    future: impl Future<Output = Result<T, E>>,
) -> Result<T, E>
Expand description

Resolve a future that promised to be ready the moment it was made.

The editor’s read path is synchronous, so a storage whose Storage::residency is Residency::Lazy is read through this: one poll, no executor, no waker. A storage that answers Pending here has broken that promise — a programming error, reported as one rather than blocking a frame on a spin.