referrerpolicy=no-referrer-when-downgrade

Trait frame_support::traits::TransactionPause

source ·
pub trait TransactionPause {
    type CallIdentifier;

    // Required methods
    fn is_paused(call: Self::CallIdentifier) -> bool;
    fn can_pause(call: Self::CallIdentifier) -> bool;
    fn pause(call: Self::CallIdentifier) -> Result<(), TransactionPauseError>;
    fn unpause(call: Self::CallIdentifier) -> Result<(), TransactionPauseError>;
}
Expand description

Can pause specific transactions from being processed.

Note that paused transactions will not be queued for later execution. Instead they will be dropped.

Required Associated Types§

source

type CallIdentifier

How to unambiguously identify a call.

For example (pallet_index, call_index).

Required Methods§

source

fn is_paused(call: Self::CallIdentifier) -> bool

Whether this call is paused.

source

fn can_pause(call: Self::CallIdentifier) -> bool

Whether this call can be paused.

This holds for the current block, but may change in the future.

source

fn pause(call: Self::CallIdentifier) -> Result<(), TransactionPauseError>

Pause this call immediately.

This takes effect in the same block and must succeed if can_pause returns true.

source

fn unpause(call: Self::CallIdentifier) -> Result<(), TransactionPauseError>

Unpause this call immediately.

This takes effect in the same block and must succeed if is_paused returns true. This invariant is important to not have un-resumable calls.

Object Safety§

This trait is not object safe.

Implementors§