pub fn condition<F>(&self, condition_func: F) -> Condition<Circuit<P>>
    where
        F: 'static + Fn(&D) -> bool,
    {
        let cond = Rc::new(RefCell::new(false));
        let cond_clone = cond.clone();
        self.inspect(move |v| *cond_clone.borrow_mut() = condition_func(v));
        Condition::new(cond)
    }
/// Attach a condition to a stream.
///
/// A [`Condition`] is a condition on the value in the stream
/// checked on each clock cycle, that can be used to terminate
/// the execution of the subcircuit (see [`Circuit::iterate_with_condition`]
/// and [`Circuit::iterate_with_conditions`]).
Attach a condition to a stream.
Attach a condition to a stream .
pub fn condition<F>(&self, condition_func: F) -> Condition<Circuit<P>>
    where
        F: 'static + Fn(&D) -> bool,
    {
        let cond = Rc::new(RefCell::new(false));
        let cond_clone = cond.clone();
        self.inspect(move |v| *cond_clone.borrow_mut() = condition_func(v));
        Condition::new(cond)
    }
pub fn condition < F > ( & self , condition_func : F ) -> Condition < Circuit < P > > where F : ' static + Fn ( & D ) -> bool , { let cond = Rc :: new ( RefCell :: new ( false ) ) ; let cond_clone = cond . clone ( ) ; self . inspect ( move | v | * cond_clone . borrow_mut ( ) = condition_func ( v ) ) ; Condition :: new ( cond ) }
Attach a condition to a stream.
Attach a condition to a stream .
&self
condition_func
F