Struct concordium_std::Amount[][src]

#[repr(transparent)]
pub struct Amount { pub micro_ccd: u64, }
Expand description

The type of amounts on the chain

Fields

micro_ccd: u64

Implementations

Create amount from a number of microCCD

Create amount from a number of CCD

Create zero amount

Add a number of micro CCD to an amount

Checked addition. Adds another amount and return None if overflow occurred

Add a number of CCD to an amount

Subtract a number of micro CCD to an amount

Subtract a number of CCD to an amount

Calculates the quotient and remainder of integer division

Trait Implementations

The resulting type after applying the + operator.

Performs the + operation. Read more

Performs the += operation. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Attempt to read a structure from a given source, failing if an error occurs during deserialization or reading. Read more

Parse from string in CCD units. The input string must be of the form n[.m] where n and m are both digits. The notation [.m] indicates that that part is optional.

  • if n starts with 0 then it must be 0l
  • m can have at most 6 digits, and must have at least 1
  • both n and m must be non-negative.

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

Performs the *= operation. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

The resulting type after applying the % operator.

Performs the % operation. Read more

Performs the %= operation. Read more

Attempt to write the structure into the provided writer, failing if only part of the structure could be written. Read more

The resulting type after applying the - operator.

Performs the - operation. Read more

Performs the -= operation. Read more

Method which takes an iterator and generates Self from the elements by “summing up” the items. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.