Struct breaktarget::BreakTarget [] [src]

pub struct BreakTarget<T>(_);

This object represents the target stack frame which we will unwind toward when the break_with method is invoked. The value which we are breaking with will be stored within the BreakTarget to be returned when control flow resumes.

Methods

impl<T> BreakTarget<T>
[src]

Deploy a break target. The target will be passed by reference to the argument closure. The BreakTarget object provides a single break_with method, which can be invoked to halt execution and return control to the deployment site. If the break_with function was not invoked, the return value of the closure will instead be produced.

Aborts the current function, returning control to the BreakTarget's deploy point. The argument to this method will be the return value of the deploy method.

Trait Implementations

impl<T: Debug> Debug for BreakTarget<T>
[src]

Formats the value using the given formatter.