Struct odra_modules::access::Ownable2StepContractRef
source · pub struct Ownable2StepContractRef { /* private fields */ }Expand description
Ownable2Step Contract Ref.
Implementations§
source§impl Ownable2StepContractRef
impl Ownable2StepContractRef
sourcepub fn get_pending_owner(&self) -> Option<Address>
pub fn get_pending_owner(&self) -> Option<Address>
Returns the address of the pending owner.
sourcepub fn transfer_ownership(&mut self, new_owner: &Address)
pub fn transfer_ownership(&mut self, new_owner: &Address)
Starts the ownership transfer of the module to a new_owner.
Replaces the pending_ownerif there is one.
This function can only be accessed by the current owner of the module.
sourcepub fn renounce_ownership(&mut self)
pub fn renounce_ownership(&mut self)
If the contract’s owner chooses to renounce their ownership, the contract will no longer have an owner. This means that any functions that can only be accessed by the owner will no longer be available.
The function can only be called by the current owner, and it will permanently remove the owner’s privileges.
sourcepub fn accept_ownership(&mut self)
pub fn accept_ownership(&mut self)
The new owner accepts the ownership transfer. Replaces the current owner and clears the pending owner.
Trait Implementations§
source§impl SchemaEvents for Ownable2StepContractRef
impl SchemaEvents for Ownable2StepContractRef
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 Ownable2StepContractRef
impl !RefUnwindSafe for Ownable2StepContractRef
impl !Send for Ownable2StepContractRef
impl !Sync for Ownable2StepContractRef
impl Unpin for Ownable2StepContractRef
impl !UnwindSafe for Ownable2StepContractRef
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