pub struct Owner {
pub owner: Variable<Address>,
pub proposed_owner: Variable<Option<Address>>,
}
Fields§
§owner: Variable<Address>
§proposed_owner: Variable<Option<Address>>
Implementations§
source§impl Owner
impl Owner
sourcepub fn propose_owner(&mut self, owner: Address)
pub fn propose_owner(&mut self, owner: Address)
Sets a new owner proposition.
sourcepub fn accept_owner(&mut self, caller: Address)
pub fn accept_owner(&mut self, caller: Address)
Accepts the new owner proposition.
sourcepub fn change_ownership(&mut self, owner: Address)
pub fn change_ownership(&mut self, owner: Address)
Set the owner to the new address.
sourcepub fn ensure_owner(&self)
pub fn ensure_owner(&self)
Verify if the contract caller is the owner. Revert otherwise.
pub fn get_owner(&self) -> Option<Address>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Owner
impl Send for Owner
impl Sync for Owner
impl Unpin for Owner
impl UnwindSafe for Owner
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