pub struct NestedAdmin<'a>(/* private fields */);
Expand description
Abstract Admin object This object has same api to the cw_controllers::Admin With added query_account_owner method (will get top-level owner in case of sub-accounts) but allows top-level abstract account owner to have admin privileges on the module
Implementations§
Source§impl<'a> NestedAdmin<'a>
impl<'a> NestedAdmin<'a>
pub const fn new(namespace: &'a str) -> Self
pub fn set<Q: CustomQuery>( &self, deps: DepsMut<'_, Q>, admin: Option<Addr>, ) -> StdResult<()>
pub fn get<Q: CustomQuery>(&self, deps: Deps<'_, Q>) -> StdResult<Option<Addr>>
pub fn is_admin<Q: CustomQuery>( &self, deps: Deps<'_, Q>, caller: &Addr, ) -> StdResult<bool>
pub fn assert_admin<Q: CustomQuery>( &self, deps: Deps<'_, Q>, caller: &Addr, ) -> Result<(), AdminError>
pub fn execute_update_admin<C, Q: CustomQuery>( &self, deps: DepsMut<'_, Q>, info: MessageInfo, new_admin: Option<Addr>, ) -> Result<Response<C>, AdminError>
pub fn query_admin<Q: CustomQuery>( &self, deps: Deps<'_, Q>, ) -> StdResult<AdminResponse>
pub fn query_account_owner<Q: CustomQuery>( &self, deps: Deps<'_, Q>, ) -> StdResult<AdminResponse>
Auto Trait Implementations§
impl<'a> Freeze for NestedAdmin<'a>
impl<'a> RefUnwindSafe for NestedAdmin<'a>
impl<'a> Send for NestedAdmin<'a>
impl<'a> Sync for NestedAdmin<'a>
impl<'a> Unpin for NestedAdmin<'a>
impl<'a> UnwindSafe for NestedAdmin<'a>
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