Struct pallet_migrations::mock_helpers::MockedMigrations
source · pub struct MockedMigrations;Expand description
Allows to set the migrations to run at runtime instead of compile-time.
It achieves this by using the storage to store the migrations to run.
Implementations§
source§impl MockedMigrations
impl MockedMigrations
sourcepub fn set(migrations: Vec<(MockedMigrationKind, u32)>)
pub fn set(migrations: Vec<(MockedMigrationKind, u32)>)
Set the migrations to run.
Trait Implementations§
source§impl MockedMigrations for MockedMigrations
impl MockedMigrations for MockedMigrations
source§fn set_fail_after(steps: u32)
fn set_fail_after(steps: u32)
The migration should fail after
n steps.source§fn set_success_after(steps: u32)
fn set_success_after(steps: u32)
The migration should succeed after
n steps.source§impl SteppedMigrations for MockedMigrations
impl SteppedMigrations for MockedMigrations
source§fn nth_step(
n: u32,
cursor: Option<Vec<u8>>,
_meter: &mut WeightMeter
) -> Option<Result<Option<Vec<u8>>, SteppedMigrationError>>
fn nth_step( n: u32, cursor: Option<Vec<u8>>, _meter: &mut WeightMeter ) -> Option<Result<Option<Vec<u8>>, SteppedMigrationError>>
source§fn nth_transactional_step(
n: u32,
cursor: Option<Vec<u8>>,
meter: &mut WeightMeter
) -> Option<Result<Option<Vec<u8>>, SteppedMigrationError>>
fn nth_transactional_step( n: u32, cursor: Option<Vec<u8>>, meter: &mut WeightMeter ) -> Option<Result<Option<Vec<u8>>, SteppedMigrationError>>
source§fn cursor_max_encoded_len() -> usize
fn cursor_max_encoded_len() -> usize
The maximal encoded length across all cursors.
source§fn identifier_max_encoded_len() -> usize
fn identifier_max_encoded_len() -> usize
The maximal encoded length across all identifiers.
Auto Trait Implementations§
impl Freeze for MockedMigrations
impl RefUnwindSafe for MockedMigrations
impl Send for MockedMigrations
impl Sync for MockedMigrations
impl Unpin for MockedMigrations
impl UnwindSafe for MockedMigrations
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
source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of
T. Read moresource§impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
type Error = <U as TryFromKey<T>>::Error
fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>
source§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from.source§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T.