pub struct OneShotControlPolicy { /* private fields */ }Expand description
A control policy that allows each captured continuation to resume once.
Implements the kernel ControlPolicy contract: prompt entry and abort are
unrestricted, but a continuation that has already been resumed cannot be
resumed again. This is the default policy installed by the control lib.
Implementations§
Trait Implementations§
Source§impl ControlPolicy for OneShotControlPolicy
impl ControlPolicy for OneShotControlPolicy
Source§fn enter_prompt(&self, _cx: &mut Cx, _prompt: &ControlPrompt) -> Result<()>
fn enter_prompt(&self, _cx: &mut Cx, _prompt: &ControlPrompt) -> Result<()>
Enter a prompt boundary; the default is a no-op.
Source§fn capture(&self, cx: &mut Cx, capture: &ControlCapture) -> Result<Ref>
fn capture(&self, cx: &mut Cx, capture: &ControlCapture) -> Result<Ref>
Capture the continuation up to a prompt; defaults to unsupported.
Auto Trait Implementations§
impl !Freeze for OneShotControlPolicy
impl RefUnwindSafe for OneShotControlPolicy
impl Send for OneShotControlPolicy
impl Sync for OneShotControlPolicy
impl Unpin for OneShotControlPolicy
impl UnsafeUnpin for OneShotControlPolicy
impl UnwindSafe for OneShotControlPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more