pub struct NonLocalExit { /* private fields */ }Expand description
A pending non-local exit: a kind, a target label, and a carried value.
Resolved by escape_to_label, which aborts to the LabeledPrompt whose
label matches.
Implementations§
Source§impl NonLocalExit
impl NonLocalExit
Sourcepub fn new(kind: NonLocalExitKind, label: Symbol, value: Ref) -> Self
pub fn new(kind: NonLocalExitKind, label: Symbol, value: Ref) -> Self
Builds a non-local exit of kind targeting label and carrying
value.
Sourcepub fn break_to(label: Symbol, value: Ref) -> Self
pub fn break_to(label: Symbol, value: Ref) -> Self
Builds a NonLocalExitKind::Break exit to label with value.
Sourcepub fn next_to(label: Symbol, value: Ref) -> Self
pub fn next_to(label: Symbol, value: Ref) -> Self
Builds a NonLocalExitKind::Next exit to label with value.
Sourcepub fn return_to(label: Symbol, value: Ref) -> Self
pub fn return_to(label: Symbol, value: Ref) -> Self
Builds a NonLocalExitKind::Return exit to label with value.
Sourcepub fn kind(&self) -> NonLocalExitKind
pub fn kind(&self) -> NonLocalExitKind
Returns the exit kind.
Trait Implementations§
Source§impl Clone for NonLocalExit
impl Clone for NonLocalExit
Source§fn clone(&self) -> NonLocalExit
fn clone(&self) -> NonLocalExit
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 NonLocalExit
impl Debug for NonLocalExit
impl Eq for NonLocalExit
Source§impl PartialEq for NonLocalExit
impl PartialEq for NonLocalExit
Source§fn eq(&self, other: &NonLocalExit) -> bool
fn eq(&self, other: &NonLocalExit) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for NonLocalExit
Auto Trait Implementations§
impl Freeze for NonLocalExit
impl RefUnwindSafe for NonLocalExit
impl Send for NonLocalExit
impl Sync for NonLocalExit
impl Unpin for NonLocalExit
impl UnsafeUnpin for NonLocalExit
impl UnwindSafe for NonLocalExit
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