[][src]Struct bitcoin::util::decimal::UDecimal

pub struct UDecimal { /* fields omitted */ }

Unsigned fixed-point decimal type

Methods

impl UDecimal[src]

pub fn new(mantissa: u64, exponent: usize) -> UDecimal[src]

Creates a new Decimal

pub fn mantissa(&self) -> u64[src]

Returns the mantissa

pub fn exponent(&self) -> usize[src]

Returns the exponent

pub fn integer_value(&self, exponent: usize) -> u64[src]

Get the decimal's value in an integer type, by multiplying by some power of ten to ensure the returned value is 10 ** exponent types the actual value.

Trait Implementations

impl Eq for UDecimal[src]

impl Clone for UDecimal[src]

impl PartialOrd<UDecimal> for UDecimal[src]

impl Ord for UDecimal[src]

impl PartialEq<UDecimal> for UDecimal[src]

impl Copy for UDecimal[src]

impl Add<UDecimal> for UDecimal[src]

type Output = UDecimal

The resulting type after applying the + operator.

impl Display for UDecimal[src]

impl Debug for UDecimal[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for 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]