Struct abstract_core::objects::pool::pool_metadata::PoolMetadata
source · pub struct PoolMetadata {
pub dex: String,
pub pool_type: PoolType,
pub assets: Vec<AssetEntry>,
}Fields§
§dex: String§pool_type: PoolType§assets: Vec<AssetEntry>Implementations§
source§impl PoolMetadata
impl PoolMetadata
pub fn new<T: ToString, U: Into<AssetEntry>>( dex_name: T, pool_type: PoolType, assets: Vec<U> ) -> Self
pub fn stable<T: ToString>( dex_name: T, assets: Vec<impl Into<AssetEntry>> ) -> Self
pub fn weighted<T: ToString>( dex_name: T, assets: Vec<impl Into<AssetEntry>> ) -> Self
pub fn constant_product<T: ToString>( dex_name: T, assets: Vec<impl Into<AssetEntry>> ) -> Self
pub fn liquidity_bootstrap<T: ToString>( dex_name: T, assets: Vec<impl Into<AssetEntry>> ) -> Self
Trait Implementations§
source§impl Clone for PoolMetadata
impl Clone for PoolMetadata
source§fn clone(&self) -> PoolMetadata
fn clone(&self) -> PoolMetadata
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 moresource§impl Debug for PoolMetadata
impl Debug for PoolMetadata
source§impl<'de> Deserialize<'de> for PoolMetadata
impl<'de> Deserialize<'de> for PoolMetadata
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for PoolMetadata
impl Display for PoolMetadata
To string Ex: “junoswap:uusd,uust:stable”
source§impl From<PoolMetadata> for LpToken
impl From<PoolMetadata> for LpToken
Build the LP token from pool metadata.
source§fn from(pool: PoolMetadata) -> Self
fn from(pool: PoolMetadata) -> Self
Converts to this type from the input type.
source§impl FromStr for PoolMetadata
impl FromStr for PoolMetadata
source§impl JsonSchema for PoolMetadata
impl JsonSchema for PoolMetadata
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moresource§impl PartialEq<PoolMetadata> for PoolMetadata
impl PartialEq<PoolMetadata> for PoolMetadata
source§fn eq(&self, other: &PoolMetadata) -> bool
fn eq(&self, other: &PoolMetadata) -> bool
This method tests for
self and other values to be equal, and is used
by ==.