pub trait PocketIcSnapshotExt {
// Required methods
fn capture_snapshots<I>(
&self,
targets: I,
) -> Result<ControllerSnapshots, ControllerSnapshotError>
where I: IntoIterator<Item = CanisterSnapshotTarget>;
fn restore_snapshots(
&self,
snapshots: &ControllerSnapshots,
funding: SnapshotRestoreFunding,
) -> Result<(), ControllerSnapshotError>;
}Expand description
Exact-sender capture and restore of related canister snapshots.
Required Methods§
Sourcefn capture_snapshots<I>(
&self,
targets: I,
) -> Result<ControllerSnapshots, ControllerSnapshotError>where
I: IntoIterator<Item = CanisterSnapshotTarget>,
fn capture_snapshots<I>(
&self,
targets: I,
) -> Result<ControllerSnapshots, ControllerSnapshotError>where
I: IntoIterator<Item = CanisterSnapshotTarget>,
Capture snapshots with one explicit sender per canister.
Input is duplicate-checked before any effects and captured in deterministic canister-id order. A later failure rolls back snapshots captured earlier in the set. No other sender is attempted after a rejection.
Sourcefn restore_snapshots(
&self,
snapshots: &ControllerSnapshots,
funding: SnapshotRestoreFunding,
) -> Result<(), ControllerSnapshotError>
fn restore_snapshots( &self, snapshots: &ControllerSnapshots, funding: SnapshotRestoreFunding, ) -> Result<(), ControllerSnapshotError>
Restore each snapshot with its exact captured sender and selected funding.
Preserve never adds cycles; TopUpTo is evaluated before each restore.
PocketIC may charge cycles for the restore itself. Rejection or panic stops
the set without retrying another sender or rewinding earlier restores.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".