pub struct Restart { /* private fields */ }Expand description
A named recovery point: a symbol bound to a captured continuation.
The condition system’s restart: invoking it resumes the underlying
ContinuationValue with a supplied value, returning control to the point
where the restart was established.
Implementations§
Source§impl Restart
impl Restart
Sourcepub fn new(name: Symbol, continuation: ContinuationValue) -> Self
pub fn new(name: Symbol, continuation: ContinuationValue) -> Self
Binds name to the recovery continuation.
Sourcepub fn continuation(&self) -> &ContinuationValue
pub fn continuation(&self) -> &ContinuationValue
Returns the continuation this restart resumes.
Sourcepub fn invoke(&self, cx: &mut Cx, value: Ref) -> Result<ControlResultValue>
pub fn invoke(&self, cx: &mut Cx, value: Ref) -> Result<ControlResultValue>
Invokes the restart, resuming its continuation with value and
returning the resulting ControlResultValue.
Trait Implementations§
impl Eq for Restart
impl StructuralPartialEq for Restart
Auto Trait Implementations§
impl Freeze for Restart
impl RefUnwindSafe for Restart
impl Send for Restart
impl Sync for Restart
impl Unpin for Restart
impl UnsafeUnpin for Restart
impl UnwindSafe for Restart
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