Skip to main content

quotation

Function quotation 

Source
pub fn quotation(s: &str) -> Quotation
Expand description

quotation_from_str for a literal that is known to be right (tests, examples, imitations).

§Panics

If the text is not a number with at most 9 decimals.

§Examples

let q = brokapi_tbank_protocol::money::quotation("114.25");
assert_eq!((q.units, q.nano), (114, 250_000_000));