Skip to main content

async_gen_enqueue

Function async_gen_enqueue 

Source
pub fn async_gen_enqueue(gen: &Value, req: GenReq) -> Value
Expand description

AsyncGeneratorEnqueue — queue one request against an async function* and hand back the promise its {value, done} record (or rejection) will settle.

All three of .next, .return and .throw come through here, so a request never resumes the body while an earlier one is still suspended on an internal await.