pub async fn stop(&self) -> Result<(), String> {
        let stop_res: Result<(), String> = self
            .runtime
            .get_management_canister()
            .update_("stop_canister", candid_multi_arity, (self.as_record(),))
            .await;
        stop_res?;
        loop {
            let status_res: Result<CanisterStatusResult, String> = self
                .runtime
                .get_management_canister()
                .update_("canister_status", candid, (self.as_record(),))
                .await;
            let status = status_res?;
            if status.status() == Stopped {
                break;
            }
        }
        Ok(())
    }
/// Tries to stop this canister, waits for it to reach the Stopped state.
Tries to stop this canister, waits for it to reach the Stopped state.
Tries to stop this canister waits for it to reach the Stopped state .
pub async fn stop(&self) -> Result<(), String> {
        let stop_res: Result<(), String> = self
            .runtime
            .get_management_canister()
            .update_("stop_canister", candid_multi_arity, (self.as_record(),))
            .await;
        stop_res?;
        loop {
            let status_res: Result<CanisterStatusResult, String> = self
                .runtime
                .get_management_canister()
                .update_("canister_status", candid, (self.as_record(),))
                .await;
            let status = status_res?;
            if status.status() == Stopped {
                break;
            }
        }
        Ok(())
    }
pub async fn stop ( & self ) -> Result < ( ) , String > { let stop_res : Result < ( ) , String > = self . runtime . get_management_canister ( ) . update_ ( " " , candid_multi_arity , ( self . as_record ( ) , ) ) . await ; stop_res ? ; loop { let status_res : Result < CanisterStatusResult , String > = self . runtime . get_management_canister ( ) . update_ ( " " , candid , ( self . as_record ( ) , ) ) . await ; let status = status_res ? ; if status . status ( ) == Stopped { break ; } } Ok ( ( ) ) }
Tries to stop this canister, waits for it to reach the Stopped state.
Tries to stop this canister waits for it to reach the Stopped state .
&self
&self