/// Creates an empty canister.
///
/// Note that this calls ic00::Method::ProvisionalCreateCanisterWithCycles,
/// which is protected by a whitelist of callers. Depending on the
/// runtime, and depending on the replica configuration, this may not be
/// authorized.
Creates an empty canister.
Note that this calls ic00::Method::ProvisionalCreateCanisterWithCycles,
which is protected by a whitelist of callers. Depending on the
runtime, and depending on the replica configuration, this may not be
authorized.
Creates an empty canister . Note that this calls ic00 :: Method :: ProvisionalCreateCanisterWithCycles which is protected by a whitelist of callers . Depending on the runtime and depending on the replica configuration this may not be authorized .
pub async fn create_canister(
        &'a self,
        num_cycles: Option<u64>,
    ) -> Result<Canister<'a>, String> {
        let canister_id_record: Result<CanisterIdRecord, String> = self
            .get_management_canister()
            .update_(
                ic00::Method::ProvisionalCreateCanisterWithCycles.to_string(),
                candid,
                (ProvisionalCreateCanisterWithCyclesArgs::new(num_cycles),),
            )
            .await;
        Ok(Canister {
            runtime: self,
            canister_id: canister_id_record?.get_canister_id(),
            wasm: None,
        })
    }
pub async fn create_canister ( & ' a self , num_cycles : Option < u64 > , ) -> Result < Canister < ' a > , String > { let canister_id_record : Result < CanisterIdRecord , String > = self . get_management_canister ( ) . update_ ( ic00 :: Method :: ProvisionalCreateCanisterWithCycles . to_string ( ) , candid , ( ProvisionalCreateCanisterWithCyclesArgs :: new ( num_cycles ) , ) , ) . await ; Ok ( Canister { runtime : self , canister_id : canister_id_record ? . get_canister_id ( ) , wasm : None , } ) }
Creates an empty canister.
Creates an empty canister .
&'a self
num_cycles
Option<u64>