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§

BaselinePoolTimings
Timings for one baseline-pool acquisition.
CachedPocketIcBaseline
One owned PocketIC instance with captured snapshots and caller metadata.
CachedPocketIcBaselineGuard
Exclusive access to one caller-provided cached-baseline slot.
CachedPocketIcBaselinePool
Caller-owned runtime-capacity pool of independently restorable PocketIC baselines.
CachedPocketIcBaselinePoolGuard
Exclusive lease of one validated pooled PocketIC baseline.
CachedStandaloneCanisterFixtureGuard
Exclusive lease of one independently restored standalone fixture.
CachedStandaloneCanisterFixturePool
Caller-owned bounded pool of independently restorable standalone fixtures.
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.
CanisterRestoreReceipt
Receipt for restoring the recipe’s captured canister set.
CanisterSnapshotTarget
One canister and exact management-call sender used for snapshot capture.
ControllerSnapshots
Deterministically ordered snapshots retaining each successful capture sender.
FixtureRecipeId
Caller-owned stable identity for one pooled fixture recipe.
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.
ReadinessReceipt
Receipt identifying the readiness boundary reached after reset.
RejectResponse
User-facing type describing an unsuccessful (also called reject) call response.
ResetReceipt
Typed reset guarantees achieved by one preparation pass.
ResetRequirements
Typed reset guarantees required by one fixture recipe.
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.
StandaloneFixturePoolTimings
Timings for one standalone fixture-pool acquisition.
ValidationReceipt
Receipt proving the recipe’s final invariant validation ran successfully.

Enums§

BaselinePoolContractError
Contract failure while constructing or verifying recipe reset evidence.
BaselinePoolError
Failure to acquire a validated baseline-pool lease.
BaselinePoolOutcome
Whether a baseline-pool lease was built, restored, or rebuilt.
BaselinePoolPreparationError
One failed recipe or contract stage while preparing a baseline slot.
BaselinePreparationStage
Recipe stage associated with a structured preparation failure.
CandidCallErrorKind
High-level Candid call failure classification.
ControllerSnapshotError
Structured controller-snapshot failure.
CycleResetPolicy
Cycle handling required or achieved by one reset.
ErrorCode
User-facing error codes.
ExtraCanisterPolicy
Extra-canister handling required or achieved by one reset.
FailureDisposition
Recipe decision for a failed restored-slot preparation stage.
PreparedBaseline
Whether validation is observing a newly built or restored baseline.
RebuildReason
Why an invalid or failed slot was reconstructed.
RejectCode
User-facing reject codes.
ResetAchievement
One reset guarantee reported as achieved by a recipe.
ResetDomainKind
Reset domain whose handling is declared by a pooled baseline recipe.
ResetRequirement
One reset guarantee required before a baseline may be reused.
RetryPolicyError
Invalid install-code retry policy configuration.
SnapshotRestoreFunding
Caller-selected cycle funding applied immediately before snapshot restore.
StandaloneFixturePoolError
Failure to acquire a standalone fixture-pool lease with structured diagnostics.
StandaloneFixturePoolOutcome
Whether a standalone fixture-pool lease was built, restored, or rebuilt.
StandaloneFixturePoolRebuildReason
Why a standalone fixture-pool slot was rebuilt.
StandaloneFixturePoolStage
Standalone fixture preparation stage associated with a snapshot failure.
StateResetPolicy
Generic handling for reset domains without a more specific policy.
TimeResetPolicy
PocketIC time handling required or achieved by one reset.

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.
PocketIcBaselineRecipe
Complete caller-owned lifecycle recipe for one pooled PocketIC baseline.
PocketIcBuilderExt
Fallible construction at PocketIC’s currently panicking builder boundary.
PocketIcCapturedSnapshotExt
Exact-sender restoration for snapshots that retained their capture sender.
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§

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.