Struct abstract_sdk::Accountant
source · pub struct Accountant<'a, T: AccountingInterface> { /* private fields */ }
Expand description
API for querying the Account’s asset values and accounting configuration.
§Example
use abstract_sdk::prelude::*;
let accountant: Accountant<MockModule> = module.accountant(deps.as_ref());
Implementations§
source§impl<'a, T: AccountingInterface> Accountant<'a, T>
impl<'a, T: AccountingInterface> Accountant<'a, T>
sourcepub fn query_total_value(&self) -> AbstractSdkResult<AccountValue>
pub fn query_total_value(&self) -> AbstractSdkResult<AccountValue>
Query the total value denominated in the base asset The provided address must implement the TotalValue Query
sourcepub fn asset_value(&self, asset_entry: AssetEntry) -> AbstractSdkResult<Uint128>
pub fn asset_value(&self, asset_entry: AssetEntry) -> AbstractSdkResult<Uint128>
Query the asset value denominated in the base asset
sourcepub fn base_asset(&self) -> AbstractSdkResult<BaseAssetResponse>
pub fn base_asset(&self) -> AbstractSdkResult<BaseAssetResponse>
Return the proxy’s base asset
sourcepub fn assets_list(&self) -> AbstractSdkResult<AssetsInfoResponse>
pub fn assets_list(&self) -> AbstractSdkResult<AssetsInfoResponse>
List enabled assets (AssetInfos)
Trait Implementations§
source§impl<'a, T: Clone + AccountingInterface> Clone for Accountant<'a, T>
impl<'a, T: Clone + AccountingInterface> Clone for Accountant<'a, T>
source§fn clone(&self) -> Accountant<'a, T>
fn clone(&self) -> Accountant<'a, T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a, T> !RefUnwindSafe for Accountant<'a, T>
impl<'a, T> !Send for Accountant<'a, T>
impl<'a, T> !Sync for Accountant<'a, T>
impl<'a, T> Unpin for Accountant<'a, T>
impl<'a, T> !UnwindSafe for Accountant<'a, T>
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