pub enum LabelRef {
Own(TLabel),
Hole(LabelHole),
}Expand description
The label of a loop or block a template creates, or a jump’s target.
§Examples
use lower_lang::{LabelRef, TemplateBuilder};
let mut t = TemplateBuilder::new("forever");
let user = t.label_hole("label");
let brk = t.break_(Some(LabelRef::Hole(user)), None);
let body = t.block(&[], Some(brk));
let root = t.loop_(Some(LabelRef::Hole(user)), body, None);
assert!(t.finish(root).is_ok());Variants§
Trait Implementations§
impl Copy for LabelRef
impl Eq for LabelRef
impl StructuralPartialEq for LabelRef
Auto Trait Implementations§
impl Freeze for LabelRef
impl RefUnwindSafe for LabelRef
impl Send for LabelRef
impl Sync for LabelRef
impl Unpin for LabelRef
impl UnsafeUnpin for LabelRef
impl UnwindSafe for LabelRef
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