pub trait CanisterInstallExt {
// Required methods
fn create_and_install_with_args(
&self,
wasm: Vec<u8>,
init_bytes: Vec<u8>,
install_cycles: u128,
) -> Principal;
fn try_create_and_install_with_args(
&self,
wasm: Vec<u8>,
init_bytes: Vec<u8>,
install_cycles: u128,
) -> Result<Principal, CanisterInstallError>;
fn create_and_install(&self, spec: InstallSpec) -> Principal;
fn try_create_and_install(
&self,
spec: InstallSpec,
) -> Result<Principal, CanisterInstallError>;
fn create_and_install_many<I>(&self, specs: I) -> Vec<Principal>
where I: IntoIterator<Item = InstallSpec>;
fn try_create_and_install_many<I>(
&self,
specs: I,
) -> Result<Vec<Principal>, CanisterInstallError>
where I: IntoIterator<Item = InstallSpec>;
fn wait_out_install_code_rate_limit(&self, cooldown: Duration);
fn retry_install_code<T, F>(
&self,
policy: RetryPolicy,
op: F,
) -> Result<T, String>
where F: FnMut() -> Result<T, String>;
}Expand description
Generic canister installation and install-code retry policies.
Required Methods§
Sourcefn create_and_install_with_args(
&self,
wasm: Vec<u8>,
init_bytes: Vec<u8>,
install_cycles: u128,
) -> Principal
fn create_and_install_with_args( &self, wasm: Vec<u8>, init_bytes: Vec<u8>, install_cycles: u128, ) -> Principal
Create and install one canister from raw wasm and init bytes.
Sourcefn try_create_and_install_with_args(
&self,
wasm: Vec<u8>,
init_bytes: Vec<u8>,
install_cycles: u128,
) -> Result<Principal, CanisterInstallError>
fn try_create_and_install_with_args( &self, wasm: Vec<u8>, init_bytes: Vec<u8>, install_cycles: u128, ) -> Result<Principal, CanisterInstallError>
Fallible counterpart to create_and_install_with_args.
Sourcefn create_and_install(&self, spec: InstallSpec) -> Principal
fn create_and_install(&self, spec: InstallSpec) -> Principal
Create and install one canister from a reusable specification.
Sourcefn try_create_and_install(
&self,
spec: InstallSpec,
) -> Result<Principal, CanisterInstallError>
fn try_create_and_install( &self, spec: InstallSpec, ) -> Result<Principal, CanisterInstallError>
Fallible counterpart to create_and_install.
Sourcefn create_and_install_many<I>(&self, specs: I) -> Vec<Principal>where
I: IntoIterator<Item = InstallSpec>,
fn create_and_install_many<I>(&self, specs: I) -> Vec<Principal>where
I: IntoIterator<Item = InstallSpec>,
Sequentially create and install multiple canisters.
Sourcefn try_create_and_install_many<I>(
&self,
specs: I,
) -> Result<Vec<Principal>, CanisterInstallError>where
I: IntoIterator<Item = InstallSpec>,
fn try_create_and_install_many<I>(
&self,
specs: I,
) -> Result<Vec<Principal>, CanisterInstallError>where
I: IntoIterator<Item = InstallSpec>,
Fallible counterpart to create_and_install_many.
Sourcefn wait_out_install_code_rate_limit(&self, cooldown: Duration)
fn wait_out_install_code_rate_limit(&self, cooldown: Duration)
Advance simulated time and rounds past an install-code cooldown.
Sourcefn retry_install_code<T, F>(
&self,
policy: RetryPolicy,
op: F,
) -> Result<T, String>
fn retry_install_code<T, F>( &self, policy: RetryPolicy, op: F, ) -> Result<T, String>
Retry an operation only while PocketIC reports install-code rate limiting.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".