Trait InspectAsset

Source
pub trait InspectAsset<Proprietor> {
    type Asset: Asset;

    // Required method
    fn available_funds(who: &Proprietor) -> Self::Asset;
}
Expand description

A trait for inspecting the total available funds of an proprietor.

This allows querying all funds that are available to a proprietor, including liquid balances and any amounts held for specific purposes that the system considers available.

In this trait’s context, “available funds” means those balances that can be used for operations in context.

Generics:

  • Proprietor - the entity that owns the asset and can make commitments.

Required Associated Types§

Source

type Asset: Asset

Representing the Quantifiable Asset Type.

Required Methods§

Source

fn available_funds(who: &Proprietor) -> Self::Asset

Retrieves the total available funds for a given proprietor.

This must include all balances that can be utilized for the implementation purposes.

§Returns
  • Self::Asset containing the total available funds for the proprietor

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§