/// Compiles the lifeline canister, builds it's initial payload and installs it
Compiles the lifeline canister, builds it's initial payload and installs it
Compiles the lifeline canister builds it ' s initial payload and installs it
pub async fn install_lifeline_canister(
    canister: &mut Canister<'_>,
    _init_payload: LifelineCanisterInitPayload,
) {
    // Use the env var if we have one, otherwise use the embedded binary.
    Wasm::from_location_specified_by_env_var("lifeline", &[])
        .unwrap_or_else(|| Wasm::from_bytes(LIFELINE_CANISTER_WASM))
        .install_with_retries_onto_canister(
            canister,
            None,
            Some(memory_allocation_of(canister.canister_id())),
        )
        .await
        .unwrap();
    println!(
        "Installed {} with the lifeline handler",
        canister.canister_id(),
    );
}
pub async fn install_lifeline_canister ( canister : & mut Canister < ' _ > , _init_payload : LifelineCanisterInitPayload , ) { // Use the env var if we have one, otherwise use the embedded binary. Wasm :: from_location_specified_by_env_var ( " " , & [ ] ) . unwrap_or_else ( | | Wasm :: from_bytes ( LIFELINE_CANISTER_WASM ) ) . install_with_retries_onto_canister ( canister , None , Some ( memory_allocation_of ( canister . canister_id ( ) ) ) , ) . await . unwrap ( ) ; println ! ( " " canister canister_id ( ) ) ; }
Compiles the lifeline canister, builds it's initial payload and installs it
Compiles the lifeline canister builds it ' s initial payload and installs it
canister
&mut Canister<'_>
_init_payload
LifelineCanisterInitPayload