Expand description
Control policy: the contract for delimited prompts, capture, and resume.
The kernel defines the prompt/capture/abort/resume records and the
ControlPolicy trait; libraries implement the concrete control behavior.
Structs§
- Control
Abort - Record describing an abort that unwinds to a prompt with a value.
- Control
Capture - Record describing a capture of the continuation up to a prompt.
- Control
Prompt - Record describing a delimited control prompt to enter.
- Control
Resume - Record describing a resume of a captured continuation with a value.
- Noop
Control Policy - Control policy that supports prompts but rejects capture, abort, and resume.
Traits§
- Control
Policy - Policy implementing delimited control: prompts, capture, abort, and resume.
Functions§
- abort
- Abort to a prompt with a value via the active control policy.
- abort_
effect - Build the capability-gated effect that requests an abort.
- aborted_
control_ result - Intern a control result recording an abort to a prompt with a value.
- capture
- Capture the continuation up to a prompt via the active control policy.
- capture_
effect - Build the capability-gated effect that requests a continuation capture.
- captured_
control_ result - Intern a control result recording a captured continuation and value.
- control_
aborted_ status - Status symbol for a control result that aborted to a prompt.
- control_
capture_ status - Status symbol naming a capture control operation.
- control_
captured_ status - Status symbol for a control result that captured a continuation.
- control_
prompt_ status - Status symbol naming a prompt-entry control operation.
- control_
result_ status - Read the status symbol of an interned control result, if
resultis one. - control_
resumed_ status - Status symbol for a control result that resumed a continuation.
- control_
unsupported_ status - Status symbol for a control result the policy did not support.
- default_
control_ prompt - The default prompt boundary reference.
- default_
control_ result_ shape - The default control result shape (the open
coreany shape). - prompt
- Run
bodyinside a control prompt, emitting the prompt effect first. - prompt_
effect - Build the capability-gated effect that requests a control prompt.
- resume
- Resume a captured continuation with a value via the active control policy.
- resume_
effect - Build the capability-gated effect that requests a resume.
- resumed_
control_ result - Intern a control result recording a resumed continuation and value.
- unsupported_
control_ diagnostic - Build the diagnostic reported when
policycannot performoperation. - unsupported_
control_ result - Intern an “unsupported” control result and push its diagnostic, for
policies that do not implement
operation.
Type Aliases§
- Control
Policy Ref - Shared, reference-counted handle to a
ControlPolicy.