Expand description
Direct PocketIC types plus value-adding host-test harness extensions.
Construct and own PocketIc instances normally, then import individual
extension traits or prelude for Candid calls, installation, diagnostics,
snapshots, fallible startup, and nanosecond time conversion. Native
simulator operations remain upstream inherent methods.
No type in this module serializes independent instances or owns PocketIC’s server download/cache policy.
Modules§
- prelude
- All PocketIC extension traits, and no data types.
Structs§
- Cached
Pocket IcBaseline - One owned PocketIC instance with captured snapshots and caller metadata.
- Cached
Pocket IcBaseline Guard - Exclusive access to one caller-provided cached-baseline slot.
- Candid
Call Context - Stable call metadata attached to a contextual call failure.
- Candid
Call Error - Structured failure from a
super::CandidCallExtoperation. - Canister
Install Error - Failed canister installation with the created canister id and diagnostics.
- Controller
Snapshots - Deterministically ordered snapshots captured with one controller policy.
- Install
Spec - Inputs and diagnostic context for one generic canister installation.
- Pocket
Ic - Main entry point for interacting with PocketIC.
- Pocket
IcBuilder - Pocket
IcStartup Error - A panic captured while PocketIC constructs an instance.
- Reject
Response - User-facing type describing an unsuccessful (also called reject) call response.
- Retry
Policy - Retry limits and simulated cooldown for install-code operations.
- Snapshot
Attempt Failure - One rejected sender attempt for a snapshot operation.
- Snapshot
Cleanup Failure - Failure to remove a snapshot while rolling back a partial capture.
- Standalone
Canister Fixture - One caller-built PocketIC instance and one installed canister.
- Standalone
Canister Install Error - Failed standalone install retaining the caller-created PocketIC instance.
Enums§
- Candid
Call Error Kind - High-level Candid call failure classification.
- Controller
Snapshot Error - Structured controller-snapshot failure.
- Error
Code - User-facing error codes.
- Reject
Code - User-facing reject codes.
- Retry
Policy Error - Invalid install-code retry policy configuration.
- Snapshot
Restore Funding - Caller-selected cycle funding applied immediately before snapshot restore.
Constants§
- LATEST_
SERVER_ VERSION - Public to facilitate downloading the PocketIC server.
Traits§
- Candid
Call Ext - Typed Candid calls with contextual encoding, rejection, and decoding errors.
- Canister
Install Ext - Generic canister installation and structured install-code retry policy.
- Pocket
IcBuilder Ext - Fallible construction at PocketIC’s currently panicking builder boundary.
- Pocket
IcDiagnostics Ext - Reusable PocketIC failure diagnostics.
- Pocket
IcSnapshot Ext - Controller-aware capture and restore of related canister snapshots.
- Pocket
IcTime Ext - Focused time conversion missing from PocketIC’s native API.
Functions§
- restore_
or_ rebuild_ cached_ pocket_ ic_ baseline - Restore one cached PocketIC baseline, rebuilding it if the owned PocketIC instance has died between tests.