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.
PocketIcManagedServer can explicitly own one exact caller-selected
server child for a serial suite. No type serializes independent instances
or owns PocketIC’s server download/cache policy.
Modules§
- prelude
- All PocketIC extension traits, and no data types.
Structs§
- Baseline
Pool Timings - Timings for one baseline-pool acquisition.
- 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.
- Cached
Pocket IcBaseline Pool - Caller-owned runtime-capacity pool of independently restorable PocketIC baselines.
- Cached
Pocket IcBaseline Pool Guard - Exclusive lease of one validated pooled PocketIC baseline.
- Cached
Standalone Canister Fixture Guard - Exclusive lease of one independently restored standalone fixture.
- Cached
Standalone Canister Fixture Pool - Caller-owned bounded pool of independently restorable standalone fixtures.
- Candid
Call Context - Stable call metadata attached to a contextual call failure.
- Candid
Call Error - Structured failure from a
super::CandidCallExtoperation. - Canister
Diagnostic LogRecord - One canister-log record retained as bounded lossy UTF-8 text.
- Canister
Diagnostic Logs - Successfully fetched canister logs after bounded text conversion.
- Canister
Diagnostics Batch Entry - One ordered labeled entry in a collect-all diagnostics batch.
- Canister
Diagnostics Batch Report - Ordered entries from a sequential collect-all diagnostics batch.
- Canister
Diagnostics Report - Independent status and log outcomes for one diagnostic collection.
- Canister
Diagnostics Request - Exact controller-aware inputs for one best-effort diagnostic collection.
- Canister
Install Error - Failed canister installation with the created canister id and diagnostics.
- Canister
LogRender Limits - Explicit bounds applied when canister logs are converted to diagnostic text.
- Canister
Restore Receipt - Receipt for restoring the recipe’s captured canister set.
- Canister
Snapshot Target - One canister and exact management-call sender used for snapshot capture.
- Canister
Status Result - Canister Status Result
- Controller
Snapshots - Deterministically ordered snapshots retaining each successful capture sender.
- Fixture
Recipe Id - Caller-owned stable identity for one pooled fixture recipe.
- Install
Spec - Inputs and diagnostic context for one generic canister installation.
- Labeled
Canister Diagnostics Request - One caller-labeled exact diagnostic request in a collect-all batch.
- Pocket
Ic - Main entry point for interacting with PocketIC.
- Pocket
IcBuilder - Pocket
IcManaged Server - Caller-owned PocketIC server process with bounded startup and output capture.
- Pocket
IcManaged Server Output - Bounded lossy UTF-8 output captured from a managed PocketIC server.
- Pocket
IcStartup Config - Explicit bounded source and policy for one PocketIC startup.
- Readiness
Receipt - Receipt identifying the readiness boundary reached after reset.
- Reject
Response - User-facing type describing an unsuccessful (also called reject) call response.
- Reset
Receipt - Typed reset guarantees achieved by one preparation pass.
- Reset
Requirements - Typed reset guarantees required by one fixture recipe.
- 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.
- Standalone
Fixture Pool Timings - Timings for one standalone fixture-pool acquisition.
- Validation
Receipt - Receipt proving the recipe’s final invariant validation ran successfully.
Enums§
- Baseline
Pool Contract Error - Contract failure while constructing or verifying recipe reset evidence.
- Baseline
Pool Error - Failure to acquire a validated baseline-pool lease.
- Baseline
Pool Outcome - Whether a baseline-pool lease was built, restored, or rebuilt.
- Baseline
Pool Preparation Error - One failed recipe or contract stage while preparing a baseline slot.
- Baseline
Preparation Stage - Recipe stage associated with a structured preparation failure.
- Candid
Call Error Kind - High-level Candid call failure classification.
- Canister
Diagnostic Failure - A failed best-effort PocketIC diagnostic call.
- Canister
Diagnostics Batch Contract Error - Structural error that prevents a diagnostics batch from starting.
- Controller
Snapshot Error - Structured controller-snapshot failure.
- Cycle
Reset Policy - Cycle handling required or achieved by one reset.
- Error
Code - User-facing error codes.
- Extra
Canister Policy - Extra-canister handling required or achieved by one reset.
- Failure
Disposition - Recipe decision for a failed restored-slot preparation stage.
- Pocket
IcStartup Error - Structured failure from bounded PocketIC construction.
- Prepared
Baseline - Whether validation is observing a newly built or restored baseline.
- Rebuild
Reason - Why an invalid or failed slot was reconstructed.
- Reject
Code - User-facing reject codes.
- Reset
Achievement - One reset guarantee reported as achieved by a recipe.
- Reset
Domain Kind - Reset domain whose handling is declared by a pooled baseline recipe.
- Reset
Requirement - One reset guarantee required before a baseline may be reused.
- Retry
Policy Error - Invalid install-code retry policy configuration.
- Snapshot
Restore Funding - Caller-selected cycle funding applied immediately before snapshot restore.
- Standalone
Fixture Pool Error - Failure to acquire a standalone fixture-pool lease with structured diagnostics.
- Standalone
Fixture Pool Outcome - Whether a standalone fixture-pool lease was built, restored, or rebuilt.
- Standalone
Fixture Pool Rebuild Reason - Why a standalone fixture-pool slot was rebuilt.
- Standalone
Fixture Pool Stage - Standalone fixture preparation stage associated with a snapshot failure.
- State
Reset Policy - Generic handling for reset domains without a more specific policy.
- Time
Reset Policy - PocketIC time handling required or achieved by one reset.
Constants§
- DEFAULT_
CANISTER_ LOG_ BYTE_ LIMIT - Default maximum aggregate raw canister-log bytes retained in diagnostics.
- DEFAULT_
CANISTER_ LOG_ RECORD_ LIMIT - Default maximum number of canister-log records retained in diagnostics.
- 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
IcBaseline Recipe - Complete caller-owned lifecycle recipe for one pooled PocketIC baseline.
- Pocket
IcBuilder Ext - Fallible construction at PocketIC’s panicking builder boundary.
- Pocket
IcDiagnostics Ext - Reusable structured 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§
- is_
dead_ pocket_ ic_ transport_ error - Detect PocketIC’s currently unstructured dead-transport failure class.
- restore_
or_ rebuild_ cached_ pocket_ ic_ baseline - Restore one cached PocketIC baseline, rebuilding it if the owned PocketIC instance has died between tests.