Skip to main content

Module pic

Module pic 

Source
Expand description

PocketIC re-exports and value-adding host-test harness helpers.

Structs§

CachedPocketIcBaseline
CachedPocketIcBaseline
CachedPocketIcBaselineGuard
CachedPocketIcBaselineGuard
CandidCallContext
CandidCallError
CandidCallError
CanisterInstallError
CanisterInstallError
ControllerSnapshots
Deterministically ordered snapshots captured with one controller policy.
InstallSpec
InstallSpec
PocketIc
Main entry point for interacting with PocketIC.
PocketIcBuilder
RejectResponse
User-facing type describing an unsuccessful (also called reject) call response.
RetryPolicy
Retry limits and simulated cooldown for install-code operations.
SnapshotAttemptFailure
One rejected sender attempt for a snapshot operation.
SnapshotCleanupFailure
Failure to remove a snapshot while rolling back a partial capture.
StandaloneCanisterFixture
StandaloneCanisterFixture

Enums§

CandidCallErrorKind
ControllerSnapshotError
Structured controller-snapshot failure.
ErrorCode
User-facing error codes.
PocketIcStartError
PocketIcStartError
RejectCode
User-facing reject codes.
StandaloneCanisterFixtureError
StandaloneCanisterFixtureError

Traits§

CandidCallExt
Typed Candid calls with contextual encoding, rejection, and decoding errors.
CanisterInstallExt
Generic canister installation and install-code retry policies.
PocketIcDiagnosticsExt
Reusable PocketIC failure diagnostics.
PocketIcSnapshotExt
Controller-aware capture and restore of related canister snapshots.
PocketIcTimeExt
Multi-step time helpers that add test policy beyond PocketIC’s primitives.

Functions§

build_pocket_ic
Build a custom PocketIC topology with typed startup diagnostics.
install_prebuilt_canister
Install one already-built wasm module into a fresh PocketIC instance with caller-provided init args and no application-specific bootstrap assumptions.
install_prebuilt_canister_from_spec
Install one already-built wasm module from a generic install specification into a fresh PocketIC instance.
install_prebuilt_canister_with_cycles
Install one already-built wasm module into a fresh PocketIC instance with caller-provided init args and explicit install cycles.
pic
Create a fresh PocketIC instance with the default application subnet layout.
restore_or_rebuild_cached_pocket_ic_baseline
Restore one cached PocketIC baseline, rebuilding it if the owned PocketIC instance has died between tests.
try_build_pocket_ic
Build a custom PocketIC topology without panicking on startup failures.
try_install_prebuilt_canister
Install one already-built wasm module into a fresh PocketIC instance with caller-provided init args and no application-specific bootstrap assumptions.
try_install_prebuilt_canister_from_spec
Install one already-built wasm module from a generic install specification into a fresh PocketIC instance.
try_install_prebuilt_canister_with_cycles
Install one already-built wasm module into a fresh PocketIC instance with caller-provided init args and explicit install cycles.
try_pic
Create a fresh PocketIC instance without panicking on startup failures.