LiquidityPoolAssetBehavior

Trait LiquidityPoolAssetBehavior 

Source
pub trait LiquidityPoolAssetBehavior {
    // Required methods
    fn new(
        asset_a: Asset,
        asset_b: Asset,
        fee: i32,
    ) -> Result<Self, &'static str>
       where Self: Sized;
    fn from_operation(ct_asset_xdr: &ChangeTrustAsset) -> Result<Self, String>
       where Self: Sized;
    fn to_xdr_object(&self) -> ChangeTrustAsset;
    fn get_liquidity_pool_parameters(&self) -> LiquidityPoolParameters;
    fn equals(&self, other: &Self) -> bool;
    fn get_asset_type(&self) -> &'static str;
    fn to_string(&self) -> String;
}

Required Methods§

Source

fn new(asset_a: Asset, asset_b: Asset, fee: i32) -> Result<Self, &'static str>
where Self: Sized,

Source

fn from_operation(ct_asset_xdr: &ChangeTrustAsset) -> Result<Self, String>
where Self: Sized,

Source

fn to_xdr_object(&self) -> ChangeTrustAsset

Source

fn get_liquidity_pool_parameters(&self) -> LiquidityPoolParameters

Source

fn equals(&self, other: &Self) -> bool

Source

fn get_asset_type(&self) -> &'static str

Source

fn to_string(&self) -> String

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§