tiny.mprompt.suspendPrompt
Defined in zig_api.
Suspends the body at prompt, so the pending start or continueWith call returns .suspended with a handle, for a body started by SuspendedRun that pauses and hands control back to the code that started or last continued it.
Source
Source: lib/mprompt/src/api.zig:247
zig
/// Suspends the body at `prompt`, so the pending `start` or `continueWith` call returns/// `.suspended` with a handle, for a body started by `SuspendedRun` that pauses and hands control/// back to the code that started or last continued it. The call returns the value the caller later/// passes to `continueWith`. `prompt` must be the prompt the body received from `start`, and the/// body must still be running on it, which assertions check in safe builds. Only a body started by/// `SuspendedRun` can call it, because under `run` the handle would be read as the body's result.pub fn suspendPrompt(comptime ResumeValue: type, prompt: *Prompt) ResumeValue { return readSlot(ResumeValue, raw.yieldPrompt(prompt, suspend_prompt_callback, null));}Source: lib/mprompt/src/root.zig:66
zig
pub const suspendPrompt = zig_api.suspendPrompt;Audit
| Definitions | 1 |
|---|---|
| Public names | 2 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |