Struct abstract_core_testing::objects::DexAssetPairing
source · pub struct DexAssetPairing(_);
Expand description
The key for an asset pairing Consists of the two assets and the dex name TODO: what if we made keys equal based on the two assets either way?
Implementations§
source§impl DexAssetPairing
impl DexAssetPairing
pub fn new(asset_x: AssetEntry, asset_y: AssetEntry, dex_name: &str) -> Self
pub fn asset_x(&self) -> &AssetEntry
pub fn asset_y(&self) -> &AssetEntry
pub fn dex(&self) -> &str
Trait Implementations§
source§impl Clone for DexAssetPairing
impl Clone for DexAssetPairing
source§fn clone(&self) -> DexAssetPairing
fn clone(&self) -> DexAssetPairing
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 DexAssetPairing
impl Debug for DexAssetPairing
source§impl<'de> Deserialize<'de> for DexAssetPairing
impl<'de> Deserialize<'de> for DexAssetPairing
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 DexAssetPairing
impl Display for DexAssetPairing
source§impl JsonSchema for DexAssetPairing
impl JsonSchema for DexAssetPairing
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 KeyDeserialize for &DexAssetPairing
impl KeyDeserialize for &DexAssetPairing
@todo: use existing method for triple tuple
source§impl Ord for DexAssetPairing
impl Ord for DexAssetPairing
source§fn cmp(&self, other: &DexAssetPairing) -> Ordering
fn cmp(&self, other: &DexAssetPairing) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<DexAssetPairing> for DexAssetPairing
impl PartialEq<DexAssetPairing> for DexAssetPairing
source§fn eq(&self, other: &DexAssetPairing) -> bool
fn eq(&self, other: &DexAssetPairing) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<DexAssetPairing> for DexAssetPairing
impl PartialOrd<DexAssetPairing> for DexAssetPairing
source§fn partial_cmp(&self, other: &DexAssetPairing) -> Option<Ordering>
fn partial_cmp(&self, other: &DexAssetPairing) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<'a> Prefixer<'a> for &DexAssetPairing
impl<'a> Prefixer<'a> for &DexAssetPairing
source§impl<'a> PrimaryKey<'a> for &DexAssetPairing
impl<'a> PrimaryKey<'a> for &DexAssetPairing
§type Prefix = (&'a AssetEntry, &'a AssetEntry)
type Prefix = (&'a AssetEntry, &'a AssetEntry)
These associated types need to implement
Prefixer
, so that they can be useful arguments
for prefix()
, sub_prefix()
, and their key-deserializable variants.type SubPrefix = &'a AssetEntry
§type Suffix = String
type Suffix = String
These associated types need to implement
KeyDeserialize
, so that they can be returned from
range_de()
and friends.type SuperSuffix = (&'a AssetEntry, String)
fn joined_key(&self) -> Vec<u8, Global>
fn joined_extra_key(&self, key: &[u8]) -> Vec<u8, Global>
source§impl Serialize for DexAssetPairing
impl Serialize for DexAssetPairing
source§impl TryFrom<AssetEntry> for DexAssetPairing
impl TryFrom<AssetEntry> for DexAssetPairing
impl Eq for DexAssetPairing
impl StructuralEq for DexAssetPairing
impl StructuralPartialEq for DexAssetPairing
Auto Trait Implementations§
impl RefUnwindSafe for DexAssetPairing
impl Send for DexAssetPairing
impl Sync for DexAssetPairing
impl Unpin for DexAssetPairing
impl UnwindSafe for DexAssetPairing
Blanket Implementations§
source§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