Struct abstract_sdk::Modules
source · pub struct Modules<'a, 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: ModuleInterface> Modules<'a, T>
impl<'a, T: ModuleInterface> Modules<'a, T>
sourcepub fn module_address(&self, module_id: ModuleId<'_>) -> AbstractSdkResult<Addr>
pub fn module_address(&self, module_id: ModuleId<'_>) -> AbstractSdkResult<Addr>
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: ModuleId<'_>,
) -> AbstractSdkResult<ContractVersion>
pub fn module_version( &self, module_id: ModuleId<'_>, ) -> AbstractSdkResult<ContractVersion>
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: ModuleId<'_>,
) -> AbstractSdkResult<()>
pub fn assert_module_dependency( &self, module_id: ModuleId<'_>, ) -> AbstractSdkResult<()>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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 more