pub struct ConditionHandler { /* private fields */ }Expand description
A handler bound to a condition kind, prompt, and capture continuation.
Installed on a ConditionStack; when a matching Condition is
signalled, its prompt and continuation drive the underlying control capture.
Implementations§
Source§impl ConditionHandler
impl ConditionHandler
Sourcepub fn new(kind: Symbol, prompt: Ref, continuation: Ref) -> Self
pub fn new(kind: Symbol, prompt: Ref, continuation: Ref) -> Self
Builds a one-shot handler for kind bound to prompt and
continuation.
Sourcepub fn multishot(self) -> Self
pub fn multishot(self) -> Self
Returns a copy of this handler marked multishot (resumable more than once).
Sourcepub fn continuation(&self) -> &Ref
pub fn continuation(&self) -> &Ref
Returns the continuation resumed after the handler runs.
Trait Implementations§
Source§impl Clone for ConditionHandler
impl Clone for ConditionHandler
Source§fn clone(&self) -> ConditionHandler
fn clone(&self) -> ConditionHandler
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConditionHandler
impl Debug for ConditionHandler
impl Eq for ConditionHandler
Source§impl PartialEq for ConditionHandler
impl PartialEq for ConditionHandler
Source§fn eq(&self, other: &ConditionHandler) -> bool
fn eq(&self, other: &ConditionHandler) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ConditionHandler
Auto Trait Implementations§
impl Freeze for ConditionHandler
impl RefUnwindSafe for ConditionHandler
impl Send for ConditionHandler
impl Sync for ConditionHandler
impl Unpin for ConditionHandler
impl UnsafeUnpin for ConditionHandler
impl UnwindSafe for ConditionHandler
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