pub trait PocketIcSnapshotExt {
// Required methods
fn capture_controller_snapshots<I>(
&self,
controller_id: Principal,
canister_ids: I,
) -> Result<ControllerSnapshots, ControllerSnapshotError>
where I: IntoIterator<Item = Principal>;
fn restore_controller_snapshots(
&self,
controller_id: Principal,
snapshots: &ControllerSnapshots,
) -> Result<(), ControllerSnapshotError>;
}Expand description
Controller-aware capture and restore of related canister snapshots.
Required Methods§
Sourcefn capture_controller_snapshots<I>(
&self,
controller_id: Principal,
canister_ids: I,
) -> Result<ControllerSnapshots, ControllerSnapshotError>where
I: IntoIterator<Item = Principal>,
fn capture_controller_snapshots<I>(
&self,
controller_id: Principal,
canister_ids: I,
) -> Result<ControllerSnapshots, ControllerSnapshotError>where
I: IntoIterator<Item = Principal>,
Capture one restorable snapshot per unique canister.
Input is validated before capture begins. If a later capture fails, snapshots already captured by this operation are deleted before the structured error is returned.
Sourcefn restore_controller_snapshots(
&self,
controller_id: Principal,
snapshots: &ControllerSnapshots,
) -> Result<(), ControllerSnapshotError>
fn restore_controller_snapshots( &self, controller_id: Principal, snapshots: &ControllerSnapshots, ) -> Result<(), ControllerSnapshotError>
Restore a previously captured snapshot set using the same controller.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".