[][src]Struct nash_protocol::types::exchange::AssetofPrecision

pub struct AssetofPrecision {
    pub asset: Asset,
    pub precision: u32,
}

Assets can potentially have different precisions across markets. This keeps track of what precision we are dealing with

Fields

asset: Assetprecision: u32

Implementations

impl AssetofPrecision[src]

pub fn with_amount(&self, amount_str: &str) -> Result<AssetAmount>[src]

Starting with an asset of some precision, create a new asset that holds a specific amount of value

Trait Implementations

impl Clone for AssetofPrecision[src]

impl Copy for AssetofPrecision[src]

impl Debug for AssetofPrecision[src]

impl<'de> Deserialize<'de> for AssetofPrecision[src]

impl Eq for AssetofPrecision[src]

impl From<AssetofPrecision> for AssetOrCrosschain[src]

impl Hash for AssetofPrecision[src]

impl Into<Asset> for AssetofPrecision[src]

Convert AssetOfPrecision back into asset, e.g., for encoding

impl PartialEq<AssetofPrecision> for AssetofPrecision[src]

impl Serialize for AssetofPrecision[src]

impl StructuralEq for AssetofPrecision[src]

impl StructuralPartialEq for AssetofPrecision[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.