pub struct RestartStack { /* private fields */ }Expand description
A stack of Restarts, searched innermost-first by name on invocation.
Models the dynamic-extent restart chain of the condition system.
Implementations§
Source§impl RestartStack
impl RestartStack
Sourcepub fn invoke(
&self,
cx: &mut Cx,
name: &Symbol,
value: Ref,
) -> Result<ControlResultValue>
pub fn invoke( &self, cx: &mut Cx, name: &Symbol, value: Ref, ) -> Result<ControlResultValue>
Invokes the nearest restart named name with value.
Fails with Error::Eval when no restart with
that name is installed.
Sourcepub fn nearest_restart(&self, name: &Symbol) -> Result<&Restart>
pub fn nearest_restart(&self, name: &Symbol) -> Result<&Restart>
Returns the innermost restart named name, or
Error::Eval when none matches.
Trait Implementations§
Source§impl Clone for RestartStack
impl Clone for RestartStack
Source§fn clone(&self) -> RestartStack
fn clone(&self) -> RestartStack
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 RestartStack
impl Debug for RestartStack
Source§impl Default for RestartStack
impl Default for RestartStack
Source§fn default() -> RestartStack
fn default() -> RestartStack
Returns the “default value” for a type. Read more
impl Eq for RestartStack
Source§impl PartialEq for RestartStack
impl PartialEq for RestartStack
Source§fn eq(&self, other: &RestartStack) -> bool
fn eq(&self, other: &RestartStack) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RestartStack
Auto Trait Implementations§
impl Freeze for RestartStack
impl RefUnwindSafe for RestartStack
impl Send for RestartStack
impl Sync for RestartStack
impl Unpin for RestartStack
impl UnsafeUnpin for RestartStack
impl UnwindSafe for RestartStack
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