/// Tries to stop this canister, waits for it to reach the Stopped state,
/// then restarts it.
///
/// This is expected to work only when the canister's controller is the
/// anonymous user.
///
/// TODO(EXE-59): Provide some IC-wide "wait for empty queues" function to
/// replace this in tests.
Tries to stop this canister, waits for it to reach the Stopped state,
then restarts it.

This is expected to work only when the canister's controller is the
anonymous user.


Tries to stop this canister waits for it to reach the Stopped state then restarts it . This is expected to work only when the canister ' s controller is the anonymous user .
pub async fn stop_then_restart(&self) -> Result<(), String> {
        self.stop().await?;
        let start_res: Result<(), String> = self
            .runtime
            .get_management_canister()
            .update_("start_canister", candid_multi_arity, (self.as_record(),))
            .await;
        start_res?;
        Ok(())
    }
pub async fn stop_then_restart ( & self ) -> Result < ( ) , String > { self . stop ( ) . await ? ; let start_res : Result < ( ) , String > = self . runtime . get_management_canister ( ) . update_ ( " " , candid_multi_arity , ( self . as_record ( ) , ) ) . await ; start_res ? ; Ok ( ( ) ) }
Tries to stop this canister, waits for it to reach the Stopped state,
then restarts it.
Tries to stop this canister waits for it to reach the Stopped state then restarts it .
&self