VaultFormatter

Trait VaultFormatter 

pub trait VaultFormatter: ReadableShardedVault {
    // Provided methods
    fn fmt_full<W>(
        &self,
        f: &mut W,
        address: &Address,
        metadata: &HashMap<Address, VaultDataType>,
    ) -> Result<(), Error>
       where W: Write { ... }
    fn fmt_data<W>(
        &self,
        f: &mut W,
        metadata: &HashMap<Address, VaultDataType>,
    ) -> Result<(), Error>
       where W: Write { ... }
    fn fmt_header<W>(&self, f: &mut W, address: &Address) -> Result<(), Error>
       where W: Write { ... }
    fn fmt_basic_info<W>(&self, f: &mut W) -> Result<(), Error>
       where W: Write { ... }
}
Expand description

A trait to prettyprint vault information, extending ReadableShardedVault

Provided Methods§

fn fmt_full<W>( &self, f: &mut W, address: &Address, metadata: &HashMap<Address, VaultDataType>, ) -> Result<(), Error>
where W: Write,

Print out complete vault details

§Parameters
  • f - formatter to write to
  • address - address of this vault
  • metadata - map of token IDs to the vault data of their mint vault

fn fmt_data<W>( &self, f: &mut W, metadata: &HashMap<Address, VaultDataType>, ) -> Result<(), Error>
where W: Write,

Prettyprints the vault data information

§Parameters
  • f - formatter to write to
  • metadata - map of token IDs to the vault data of their mint vault

fn fmt_header<W>(&self, f: &mut W, address: &Address) -> Result<(), Error>
where W: Write,

Prettyprints the header for this vault

fn fmt_basic_info<W>(&self, f: &mut W) -> Result<(), Error>
where W: Write,

Prettyprints the basic vault information like native balance, shard

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§

§

impl<T> VaultFormatter for T