Struct abstract_app::traits::Modules
source · pub struct Modules<'a, T>where
T: ModuleInterface,{ /* private fields */ }Expand description
API for retrieving information about installed modules.
§Example
use abstract_sdk::prelude::*;
let modules: Modules<MockModule> = module.modules(deps.as_ref());Implementations§
source§impl<'a, T> Modules<'a, T>where
T: ModuleInterface,
impl<'a, T> Modules<'a, T>where
T: ModuleInterface,
sourcepub fn module_address(&self, module_id: &str) -> Result<Addr, AbstractSdkError>
pub fn module_address(&self, module_id: &str) -> Result<Addr, AbstractSdkError>
Retrieve the address of an application in this Account.
This should not be used to execute messages on an Api.
Use Modules::api_request(..) instead.
sourcepub fn module_version(
&self,
module_id: &str
) -> Result<ContractVersion, AbstractSdkError>
pub fn module_version( &self, module_id: &str ) -> Result<ContractVersion, AbstractSdkError>
Retrieve the version of an application in this Account. Note: this method makes use of the Cw2 query and may not coincide with the version of the module listed in VersionControl.
sourcepub fn assert_module_dependency(
&self,
module_id: &str
) -> Result<(), AbstractSdkError>
pub fn assert_module_dependency( &self, module_id: &str ) -> Result<(), AbstractSdkError>
Assert that a module is a dependency of this module.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for Modules<'a, T>
impl<'a, T> !RefUnwindSafe for Modules<'a, T>
impl<'a, T> !Send for Modules<'a, T>
impl<'a, T> !Sync for Modules<'a, T>
impl<'a, T> Unpin for Modules<'a, T>
impl<'a, T> !UnwindSafe for Modules<'a, T>
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