PauseModule

Trait PauseModule 

Source
pub trait PauseModule: ContractBase + Sized {
    // Required methods
    fn is_paused(&self) -> bool;
    fn set_paused(&self, paused: bool);

    // Provided methods
    fn not_paused(&self) -> bool { ... }
    fn pause_endpoint(&self) -> SCResult<()> { ... }
    fn unpause_endpoint(&self) -> SCResult<()> { ... }
}
Expand description

The module deals with temporarily pausing contract operations. It provides a flag that contracts can use to check if owner decided to pause the entire contract. Use the features module for more granular on/off switches.

Required Methods§

Source

fn is_paused(&self) -> bool

Source

fn set_paused(&self, paused: bool)

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<C> PauseModule for C
where C: AutoImpl,