pub struct CachedPocketIcBaselinePoolGuard<'a, R>where
R: PocketIcBaselineRecipe,{ /* private fields */ }Expand description
Exclusive lease of one validated pooled PocketIC baseline.
Implementations§
Source§impl<R> CachedPocketIcBaselinePoolGuard<'_, R>where
R: PocketIcBaselineRecipe,
impl<R> CachedPocketIcBaselinePoolGuard<'_, R>where
R: PocketIcBaselineRecipe,
Sourcepub fn invalidate(&mut self, reason: RebuildReason)
pub fn invalidate(&mut self, reason: RebuildReason)
Mark this slot non-reusable with a structured rebuild reason.
Methods from Deref<Target = CachedPocketIcBaseline<R::Metadata>>§
Sourcepub fn restore(
&self,
controller_id: Principal,
) -> Result<(), ControllerSnapshotError>
pub fn restore( &self, controller_id: Principal, ) -> Result<(), ControllerSnapshotError>
Restore the captured snapshot set without adding cycles.
Sourcepub fn restore_with_funding(
&self,
controller_id: Principal,
funding: SnapshotRestoreFunding,
) -> Result<(), ControllerSnapshotError>
pub fn restore_with_funding( &self, controller_id: Principal, funding: SnapshotRestoreFunding, ) -> Result<(), ControllerSnapshotError>
Restore the captured snapshot set with an explicit cycle-funding policy.
Sourcepub fn pocket_ic(&self) -> &PocketIc
pub fn pocket_ic(&self) -> &PocketIc
Borrow the owned PocketIC instance behind this cached baseline.
Sourcepub fn snapshot_count(&self) -> usize
pub fn snapshot_count(&self) -> usize
Return the number of canisters captured by this baseline.
Sourcepub fn snapshot_canister_ids(&self) -> impl Iterator<Item = Principal> + '_
pub fn snapshot_canister_ids(&self) -> impl Iterator<Item = Principal> + '_
Iterate over captured canister ids in deterministic principal order.
Trait Implementations§
Source§impl<R> Deref for CachedPocketIcBaselinePoolGuard<'_, R>where
R: PocketIcBaselineRecipe,
impl<R> Deref for CachedPocketIcBaselinePoolGuard<'_, R>where
R: PocketIcBaselineRecipe,
Source§type Target = CachedPocketIcBaseline<<R as PocketIcBaselineRecipe>::Metadata>
type Target = CachedPocketIcBaseline<<R as PocketIcBaselineRecipe>::Metadata>
The resulting type after dereferencing.
Auto Trait Implementations§
impl<'a, R> !Send for CachedPocketIcBaselinePoolGuard<'a, R>
impl<'a, R> Freeze for CachedPocketIcBaselinePoolGuard<'a, R>
impl<'a, R> RefUnwindSafe for CachedPocketIcBaselinePoolGuard<'a, R>
impl<'a, R> Sync for CachedPocketIcBaselinePoolGuard<'a, R>
impl<'a, R> Unpin for CachedPocketIcBaselinePoolGuard<'a, R>
impl<'a, R> UnsafeUnpin for CachedPocketIcBaselinePoolGuard<'a, R>
impl<'a, R> UnwindSafe for CachedPocketIcBaselinePoolGuard<'a, R>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more