Skip to main content

Module control

Module control 

Source
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§

ControlAbort
Record describing an abort that unwinds to a prompt with a value.
ControlCapture
Record describing a capture of the continuation up to a prompt.
ControlPrompt
Record describing a delimited control prompt to enter.
ControlResume
Record describing a resume of a captured continuation with a value.
NoopControlPolicy
Control policy that supports prompts but rejects capture, abort, and resume.

Traits§

ControlPolicy
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 result is 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 core any shape).
prompt
Run body inside 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 policy cannot perform operation.
unsupported_control_result
Intern an “unsupported” control result and push its diagnostic, for policies that do not implement operation.

Type Aliases§

ControlPolicyRef
Shared, reference-counted handle to a ControlPolicy.