Struct abstract_app::objects::nested_admin::NestedAdmin
source · 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) -> NestedAdmin<'a>
pub fn set<Q>(
&self,
deps: DepsMut<'_, Q>,
admin: Option<Addr>
) -> Result<(), StdError>where
Q: CustomQuery,
pub fn get<Q>(&self, deps: Deps<'_, Q>) -> Result<Option<Addr>, StdError>where
Q: CustomQuery,
pub fn is_admin<Q>(
&self,
deps: Deps<'_, Q>,
caller: &Addr
) -> Result<bool, StdError>where
Q: CustomQuery,
pub fn assert_admin<Q>(
&self,
deps: Deps<'_, Q>,
caller: &Addr
) -> Result<(), AdminError>where
Q: CustomQuery,
pub fn execute_update_admin<C, Q>( &self, deps: DepsMut<'_, Q>, info: MessageInfo, new_admin: Option<Addr> ) -> Result<Response<C>, AdminError>
pub fn query_admin<Q>(
&self,
deps: Deps<'_, Q>
) -> Result<AdminResponse, StdError>where
Q: CustomQuery,
pub fn query_account_owner<Q>(
&self,
deps: Deps<'_, Q>
) -> Result<AdminResponse, StdError>where
Q: CustomQuery,
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request