pub(crate) async fn crank_until<F>(
        &mut self,
        node_id: &R::NodeId,
        rng: &mut TestRng,
        condition: F,
        within: Duration,
    ) where
        F: Fn(&R::Event) -> bool + Send + 'static,
    {
        self.nodes
            .get_mut(node_id)
            .unwrap()
            .reactor_mut()
            .set_condition_checker(Box::new(condition));

        time::timeout(within, self.crank_and_check_indefinitely(node_id, rng))
            .await
            .unwrap()
    }
/// Crank only the specified runner until `condition` is true or until `within` has elapsed.
///
/// Returns `true` if `condition` has been met within the specified timeout.
Crank only the specified runner until `condition` is true or until `within` has elapsed.
Returns `true` if `condition` has been met within the specified timeout.
Crank only the specified runner until ` condition ` is true or until ` within ` has elapsed . Returns ` true ` if ` condition ` has been met within the specified timeout .
pub(crate) async fn crank_until<F>(
        &mut self,
        node_id: &R::NodeId,
        rng: &mut TestRng,
        condition: F,
        within: Duration,
    ) where
        F: Fn(&R::Event) -> bool + Send + 'static,
    {
        self.nodes
            .get_mut(node_id)
            .unwrap()
            .reactor_mut()
            .set_condition_checker(Box::new(condition));
        time::timeout(within, self.crank_and_check_indefinitely(node_id, rng))
            .await
            .unwrap()
    }
pub ( crate ) async fn crank_until < F > ( & mut self , node_id : & R :: NodeId , rng : & mut TestRng , condition : F , within : Duration , ) where F : Fn ( & R :: Event ) -> bool + Send + ' static , { self . nodes . get_mut ( node_id ) . unwrap ( ) . reactor_mut ( ) . set_condition_checker ( Box :: new ( condition ) ) ; time :: timeout ( within , self . crank_and_check_indefinitely ( node_id , rng ) ) . await . unwrap ( ) }
Crank only the specified runner until `condition` is true or until `within` has elapsed.
Crank only the specified runner until ` condition ` is true or until ` within ` has elapsed .
&mut self
node_id
&R::NodeId
rng
&mut TestRng
condition
F
within
Duration
&mut self
node_id
&R::NodeId
rng
&mut TestRng
condition
F
within
Duration