pub struct CachedPicBaseline<T> { /* private fields */ }Expand description
CachedPicBaseline
Implementations§
Source§impl<T> CachedPicBaseline<T>
impl<T> CachedPicBaseline<T>
Sourcepub fn capture<I>(
pic: Pic,
controller_id: Principal,
canister_ids: I,
metadata: T,
) -> Option<Self>where
I: IntoIterator<Item = Principal>,
pub fn capture<I>(
pic: Pic,
controller_id: Principal,
canister_ids: I,
metadata: T,
) -> Option<Self>where
I: IntoIterator<Item = Principal>,
Capture one immutable cached baseline from the current PocketIC instance.
Sourcepub fn restore(&self, controller_id: Principal)
pub fn restore(&self, controller_id: Principal)
Restore the captured snapshot set back into the owned PocketIC instance.
Sourcepub const fn pic(&self) -> &Pic
pub const fn pic(&self) -> &Pic
Borrow the owned PocketIC instance behind this cached baseline.
Sourcepub const fn pic_mut(&mut self) -> &mut Pic
pub const fn pic_mut(&mut self) -> &mut Pic
Mutably borrow the owned PocketIC instance behind this cached baseline.
Sourcepub const fn metadata(&self) -> &T
pub const fn metadata(&self) -> &T
Borrow the captured metadata associated with this cached baseline.
Sourcepub const fn metadata_mut(&mut self) -> &mut T
pub const fn metadata_mut(&mut self) -> &mut T
Mutably borrow the captured metadata associated with this cached baseline.
Auto Trait Implementations§
impl<T> Freeze for CachedPicBaseline<T>where
T: Freeze,
impl<T> !RefUnwindSafe for CachedPicBaseline<T>
impl<T> Send for CachedPicBaseline<T>where
T: Send,
impl<T> Sync for CachedPicBaseline<T>where
T: Sync,
impl<T> Unpin for CachedPicBaseline<T>where
T: Unpin,
impl<T> UnsafeUnpin for CachedPicBaseline<T>where
T: UnsafeUnpin,
impl<T> !UnwindSafe for CachedPicBaseline<T>
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