Struct abstract_client::Application
source · pub struct Application<T: CwEnv, M> { /* private fields */ }Expand description
An application represents a module installed on a (sub)-Account.
It derefs to the module itself, so you can call its methods directly from the application struct.
Implementations§
source§impl<Chain: CwEnv, M: RegisteredModule> Application<Chain, M>
impl<Chain: CwEnv, M: RegisteredModule> Application<Chain, M>
sourcepub fn new(
account: Account<Chain>,
module: M
) -> Result<Self, AbstractClientError>
pub fn new( account: Account<Chain>, module: M ) -> Result<Self, AbstractClientError>
Get module interface installed on provided account
sourcepub fn module<T: RegisteredModule + From<Contract<Chain>>>(
&self
) -> Result<T, AbstractClientError>
pub fn module<T: RegisteredModule + From<Contract<Chain>>>( &self ) -> Result<T, AbstractClientError>
Attempts to get a module on the application. This would typically be a dependency of the
module of type M.
Trait Implementations§
source§impl<Chain: CwEnv, M> Deref for Application<Chain, M>
impl<Chain: CwEnv, M> Deref for Application<Chain, M>
Allows to access the module’s methods directly from the application struct
Auto Trait Implementations§
impl<T, M> RefUnwindSafe for Application<T, M>where
M: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, M> Send for Application<T, M>
impl<T, M> Sync for Application<T, M>
impl<T, M> Unpin for Application<T, M>
impl<T, M> UnwindSafe for Application<T, M>where
M: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moresource§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