Skip to main content

Module pic

Module pic 

Source
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§

CachedPocketIcBaseline
One owned PocketIC instance with captured snapshots and caller metadata.
CachedPocketIcBaselineGuard
Exclusive access to one caller-provided cached-baseline slot.
CandidCallContext
Stable call metadata attached to a contextual call failure.
CandidCallError
Structured failure from a super::CandidCallExt operation.
CanisterInstallError
Failed canister installation with the created canister id and diagnostics.
ControllerSnapshots
Deterministically ordered snapshots captured with one controller policy.
InstallSpec
Inputs and diagnostic context for one generic canister installation.
PocketIc
Main entry point for interacting with PocketIC.
PocketIcBuilder
PocketIcStartupError
A panic captured while PocketIC constructs an instance.
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
One caller-built PocketIC instance and one installed canister.
StandaloneCanisterInstallError
Failed standalone install retaining the caller-created PocketIC instance.

Enums§

CandidCallErrorKind
High-level Candid call failure classification.
ControllerSnapshotError
Structured controller-snapshot failure.
ErrorCode
User-facing error codes.
RejectCode
User-facing reject codes.
RetryPolicyError
Invalid install-code retry policy configuration.
SnapshotRestoreFunding
Caller-selected cycle funding applied immediately before snapshot restore.

Constants§

LATEST_SERVER_VERSION
Public to facilitate downloading the PocketIC server.

Traits§

CandidCallExt
Typed Candid calls with contextual encoding, rejection, and decoding errors.
CanisterInstallExt
Generic canister installation and structured install-code retry policy.
PocketIcBuilderExt
Fallible construction at PocketIC’s currently panicking builder boundary.
PocketIcDiagnosticsExt
Reusable PocketIC failure diagnostics.
PocketIcSnapshotExt
Controller-aware capture and restore of related canister snapshots.
PocketIcTimeExt
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.