pub struct StandaloneCanisterRecipe<B> { /* private fields */ }Expand description
Snapshot-only recipe for one caller-built, installed canister.
Use with super::CachedPocketIcBaselinePool. The baseline metadata is the
installed canister ID; calls go through the baseline’s borrowed PocketIC.
The builder owns initialization and readiness before capture and must produce
the same topology and seeded state for every slot of this recipe.
Only the captured canister is restored. Time, other canisters, pending work and external resources are not reset. Use a custom recipe or a fresh instance when those mutations matter. Funding is applied immediately before restore. Non-transport restore failures are fatal: the pool discards the affected baseline before returning the error. Dead transport permits one recovery build.
Implementations§
Source§impl<B> StandaloneCanisterRecipe<B>
impl<B> StandaloneCanisterRecipe<B>
Sourcepub fn new(
id: FixtureRecipeId,
funding: SnapshotRestoreFunding,
build: B,
) -> Self
pub fn new( id: FixtureRecipeId, funding: SnapshotRestoreFunding, build: B, ) -> Self
Describe a single-canister recipe without invoking its builder.
Static suites can initialize the recipe and pool with std::sync::LazyLock.