Struct odra_modules::security::Pauseable
source · pub struct Pauseable { /* private fields */ }Expand description
The Pauseable module.
Implementations§
source§impl Pauseable
impl Pauseable
sourcepub fn require_not_paused(&self)
pub fn require_not_paused(&self)
Reverts with [Error::UnpausedRequired] if the contract is paused.
sourcepub fn require_paused(&self)
pub fn require_paused(&self)
Reverts with [Error::PausedRequired] if the contract is paused.
Trait Implementations§
source§impl Module for Pauseable
impl Module for Pauseable
source§fn new(env: Rc<ContractEnv>) -> Self
fn new(env: Rc<ContractEnv>) -> Self
Creates a new instance of the module with the given contract environment.
source§fn env(&self) -> Rc<ContractEnv>
fn env(&self) -> Rc<ContractEnv>
Returns the contract environment associated with the module.
source§impl SchemaErrors for Pauseable
impl SchemaErrors for Pauseable
source§impl SchemaEvents for Pauseable
impl SchemaEvents for Pauseable
source§fn custom_types() -> Vec<Option<CustomType>>
fn custom_types() -> Vec<Option<CustomType>>
Returns a vector of CustomTypes. Read more
Auto Trait Implementations§
impl Freeze for Pauseable
impl !RefUnwindSafe for Pauseable
impl !Send for Pauseable
impl !Sync for Pauseable
impl Unpin for Pauseable
impl !UnwindSafe for Pauseable
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