pub struct RubyBlockScope { /* private fields */ }Expand description
A labeled Ruby block scope targeted by break and next exits.
Lowers Ruby block control onto the control organ’s labeled-prompt contract: the scope pairs a label with the control prompt that bounds it.
Implementations§
Source§impl RubyBlockScope
impl RubyBlockScope
Sourcepub fn new(label: Symbol) -> Self
pub fn new(label: Symbol) -> Self
Creates a block scope for label, deriving its control prompt.
Sourcepub fn labeled_prompt(&self) -> LabeledPrompt
pub fn labeled_prompt(&self) -> LabeledPrompt
Returns the LabeledPrompt pairing this scope’s label and prompt.
Trait Implementations§
Source§impl Clone for RubyBlockScope
impl Clone for RubyBlockScope
Source§fn clone(&self) -> RubyBlockScope
fn clone(&self) -> RubyBlockScope
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 RubyBlockScope
impl Debug for RubyBlockScope
impl Eq for RubyBlockScope
Source§impl PartialEq for RubyBlockScope
impl PartialEq for RubyBlockScope
Source§fn eq(&self, other: &RubyBlockScope) -> bool
fn eq(&self, other: &RubyBlockScope) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RubyBlockScope
Auto Trait Implementations§
impl Freeze for RubyBlockScope
impl RefUnwindSafe for RubyBlockScope
impl Send for RubyBlockScope
impl Sync for RubyBlockScope
impl Unpin for RubyBlockScope
impl UnsafeUnpin for RubyBlockScope
impl UnwindSafe for RubyBlockScope
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.