#[non_exhaustive]pub enum CycleResetPolicy {
PreserveCurrent,
TopUpTo(u128),
RestoreExactBaseline,
RebuildOnMutation,
}Expand description
Cycle handling required or achieved by one reset.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
PreserveCurrent
Do not proactively add or remove cycles before snapshot restoration.
PocketIC may still charge cycles while performing the restore.
TopUpTo(u128)
Add cycles as needed to reach this minimum immediately before restore, without removing excess.
RestoreExactBaseline
Restore the exact balance recorded by the recipe baseline.
RebuildOnMutation
Treat any relevant cycle mutation as requiring slot reconstruction.
Trait Implementations§
Source§impl Clone for CycleResetPolicy
impl Clone for CycleResetPolicy
Source§fn clone(&self) -> CycleResetPolicy
fn clone(&self) -> CycleResetPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CycleResetPolicy
Source§impl Debug for CycleResetPolicy
impl Debug for CycleResetPolicy
impl Eq for CycleResetPolicy
Source§impl PartialEq for CycleResetPolicy
impl PartialEq for CycleResetPolicy
impl StructuralPartialEq for CycleResetPolicy
Auto Trait Implementations§
impl Freeze for CycleResetPolicy
impl RefUnwindSafe for CycleResetPolicy
impl Send for CycleResetPolicy
impl Sync for CycleResetPolicy
impl Unpin for CycleResetPolicy
impl UnsafeUnpin for CycleResetPolicy
impl UnwindSafe for CycleResetPolicy
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.