Struct zingen::ControlStack
source · pub struct ControlStack { /* private fields */ }Expand description
The control stack.
Implementations§
source§impl ControlStack
impl ControlStack
sourcepub fn mark_else(&mut self) -> Result<ControlStackFrame>
pub fn mark_else(&mut self) -> Result<ControlStackFrame>
Mark the else block of an if.
sourcepub fn push(&mut self, frame: ControlStackFrame)
pub fn push(&mut self, frame: ControlStackFrame)
Push a control stack frame.
sourcepub fn pop(&mut self) -> Result<ControlStackFrame>
pub fn pop(&mut self) -> Result<ControlStackFrame>
Pop a control stack frame.
sourcepub fn label_from_depth(&self, depth: u32) -> Result<u16>
pub fn label_from_depth(&self, depth: u32) -> Result<u16>
Get the label of the control stack frame at given depth.
sourcepub fn ret_ty(&self, depth: usize) -> Result<BlockType>
pub fn ret_ty(&self, depth: usize) -> Result<BlockType>
Get the return type of the control stack frame at given depth.
sourcepub fn ty(&self, depth: usize) -> Result<ControlStackFrameType>
pub fn ty(&self, depth: usize) -> Result<ControlStackFrameType>
Get the type of the control stack frame at given depth.
Trait Implementations§
source§impl Default for ControlStack
impl Default for ControlStack
source§fn default() -> ControlStack
fn default() -> ControlStack
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for ControlStack
impl Send for ControlStack
impl Sync for ControlStack
impl Unpin for ControlStack
impl UnwindSafe for ControlStack
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