Struct stdtx::decimal::Decimal [−][src]
pub struct Decimal(_);
Expand description
Decimal type which follows Cosmos sdk.Dec
conventions.
Implementations
Create a new Decimal
with the given whole number and decimal
parts. The decimal part assumes 18 digits of precision e.g. a
decimal with (1, 1)
is 1.000000000000000001
.
18 digits required by the Cosmos SDK. See: See: https://github.com/cosmos/cosmos-sdk/blob/26d6e49/types/decimal.go#L23
Serialize this Decimal
as Amino-encoded bytes
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Decimal
impl UnwindSafe for Decimal
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self