[][src]Struct jlib::base::misc::amount::Amount

pub struct Amount {
    pub value: BigInt,
    pub offset: i32,
    pub is_native: bool,
    pub is_negative: bool,
    pub currency: Option<String>,
    pub issuer: Option<String>,
}

Fields

value: BigIntoffset: i32is_native: boolis_negative: boolcurrency: Option<String>issuer: Option<String>

Methods

impl Amount[src]

pub fn new(
    value: BigInt,
    offset: i32,
    is_native: bool,
    is_negative: bool,
    currency: Option<String>,
    issuer: Option<String>
) -> Self
[src]

pub fn from_ramount(ramount: &RAmount) -> Amount[src]

pub fn f64_2_usize_str(value_str: &String) -> String[src]

pub fn from_value(value: u64) -> Self[src]

pub fn from_json(j: String) -> Self[src]

pub fn is_zero(&self) -> bool[src]

pub fn is_negative(&self) -> bool[src]

pub fn issuer(&self) -> String[src]

pub fn tum_to_bytes(&self) -> Vec<u8>[src]

pub fn calc_base_str(point_len: usize) -> &'static str[src]

Trait Implementations

impl Default for Amount[src]

impl Debug for Amount[src]

Auto Trait Implementations

impl Sync for Amount

impl Send for Amount

impl Unpin for Amount

impl RefUnwindSafe for Amount

impl UnwindSafe for Amount

Blanket Implementations

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

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

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.

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Downcast for T where
    T: Any