Struct odra_modules::access::Ownable2StepRef
source · pub struct Ownable2StepRef { /* private fields */ }Expand description
Reference to the Ownable2Step contract instance.
Implementations§
source§impl Ownable2StepRef
impl Ownable2StepRef
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 Clone for Ownable2StepRef
impl Clone for Ownable2StepRef
source§fn clone(&self) -> Ownable2StepRef
fn clone(&self) -> Ownable2StepRef
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Ownable2StepRef
impl RefUnwindSafe for Ownable2StepRef
impl Send for Ownable2StepRef
impl Sync for Ownable2StepRef
impl Unpin for Ownable2StepRef
impl UnwindSafe for Ownable2StepRef
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