Struct Currency

Source
pub struct Currency { /* private fields */ }
Expand description

Represents currency through an optional symbol and amount of coin.

Every 100 coins represents a banknote. (coin: 100 => 1.00)

Implementations§

Source§

impl Currency

Source

pub fn new() -> Self

Creates a blank Currency with no symbol and 0 coin.

Source

pub fn from_str(s: &str) -> Result<Currency, ParseCurrencyError>

Parses a string literal (&str) and attempts to convert it into a currency. Returns Ok(Currency) on a successful conversion, otherwise Err(ParseCurrencyError).

§Examples
use currency::Currency;

let c1 = Currency::from_str("$42.32").unwrap();
let c2 = Currency::from_str("$0.10").unwrap();
assert_eq!(c1 + c2, Currency::from_str("$42.42").unwrap());
Source

pub fn sign(&self) -> Sign

Returns the Sign of the BigInt holding the coins.

Source

pub fn value(&self) -> &BigInt

Returns the number of coins held in the Currency as &BigInt.

Should you need ownership of the returned BigInt, call clone() on it.

§Examples
extern crate num;
extern crate currency;

fn main() {
    use num::traits::ToPrimitive;
    use currency::Currency;

    let c1 = Currency::new();
    assert_eq!(c1.value().to_u32().unwrap(), 0);

    let c2 = Currency::from_str("$1.42").unwrap();
    assert_eq!(c2.value().to_u32().unwrap(), 142);
}
Source

pub fn convert(&self, conversion_rate: f64, currency_symbol: char) -> Currency

Returns a new Currency by multiplying the coin by the conversion rate and changing the symbol.

§Examples
use currency::Currency;

let dollars = Currency::from_str("$10.00").unwrap();
let conv_rate = 0.89;
let euros = dollars.convert(0.89, '€');
assert_eq!(euros, Currency::from_str("€8.90").unwrap());

Trait Implementations§

Source§

impl<'a, 'b> Add<&'b Currency> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the + operator.
Source§

fn add(self, other: &'b Currency) -> Currency

Performs the + operation. Read more
Source§

impl<'a> Add<&'a Currency> for Currency

Source§

type Output = Currency

The resulting type after applying the + operator.
Source§

fn add(self, other: &'a Currency) -> Currency

Performs the + operation. Read more
Source§

impl<'a> Add<Currency> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the + operator.
Source§

fn add(self, other: Currency) -> Currency

Performs the + operation. Read more
Source§

impl Add for Currency

Source§

type Output = Currency

The resulting type after applying the + operator.
Source§

fn add(self, other: Currency) -> Currency

Performs the + operation. Read more
Source§

impl Clone for Currency

Source§

fn clone(&self) -> Currency

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Currency

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Currency

Source§

fn default() -> Currency

Returns the “default value” for a type. Read more
Source§

impl Display for Currency

Allows any Currency to be displayed as a String. The format includes comma delimiting with a two digit precision decimal.

§Example

use currency::Currency;

let dollars = Currency::from_str("$12.10").unwrap();
assert_eq!(dollars.to_string(), "$12.10");

let euros = Currency::from_str("£1.000").unwrap();
assert_eq!(format!("{:e}", euros), "£1.000,00");
Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, 'b> Div<&'b BigUint> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b BigUint) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<&'a BigUint> for Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a BigUint) -> Currency

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b Currency> for &'a BigUint

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b Currency> for &'a Currency

Overloads the ‘/’ operator between two borrowed Currency objects.

§Panics

Panics if they aren’t the same type of currency, as denoted by the currency’s symbol.

Source§

type Output = BigInt

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b Currency) -> BigInt

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b Currency> for &'a f32

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b Currency> for &'a f64

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b Currency> for &'a i16

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b Currency> for &'a i32

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b Currency> for &'a i64

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b Currency> for &'a i8

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b Currency> for &'a isize

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b Currency> for &'a u16

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b Currency> for &'a u32

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b Currency> for &'a u64

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b Currency> for &'a u8

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b Currency> for &'a usize

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<&'a Currency> for BigUint

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<&'a Currency> for Currency

Overloads the ‘/’ operator between an owned Currency object and a borrowed one.

§Panics

Panics if they aren’t the same type of currency, as denoted by the currency’s symbol.

Source§

type Output = BigInt

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a Currency) -> BigInt

Performs the / operation. Read more
Source§

impl<'a> Div<&'a Currency> for f32

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<&'a Currency> for f64

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<&'a Currency> for i16

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<&'a Currency> for i32

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<&'a Currency> for i64

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<&'a Currency> for i8

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<&'a Currency> for isize

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<&'a Currency> for u16

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<&'a Currency> for u32

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<&'a Currency> for u64

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<&'a Currency> for u8

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<&'a Currency> for usize

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b f32> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b f32) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<&'a f32> for Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a f32) -> Currency

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b f64> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b f64) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<&'a f64> for Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a f64) -> Currency

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b i16> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b i16) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<&'a i16> for Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a i16) -> Currency

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b i32> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b i32) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<&'a i32> for Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a i32) -> Currency

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b i64> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b i64) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<&'a i64> for Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a i64) -> Currency

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b i8> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b i8) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<&'a i8> for Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a i8) -> Currency

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b isize> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b isize) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<&'a isize> for Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a isize) -> Currency

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b u16> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b u16) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<&'a u16> for Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a u16) -> Currency

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b u32> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b u32) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<&'a u32> for Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a u32) -> Currency

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b u64> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b u64) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<&'a u64> for Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a u64) -> Currency

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b u8> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b u8) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<&'a u8> for Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a u8) -> Currency

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b usize> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b usize) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<&'a usize> for Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a usize) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<BigUint> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: BigUint) -> Currency

Performs the / operation. Read more
Source§

impl Div<BigUint> for Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: BigUint) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<Currency> for &'a BigUint

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<Currency> for &'a Currency

Overloads the ‘/’ operator between a borrowed Currency object and an owned one.

§Panics

Panics if they aren’t the same type of currency, as denoted by the currency’s symbol.

Source§

type Output = BigInt

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> BigInt

Performs the / operation. Read more
Source§

impl<'a> Div<Currency> for &'a f32

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<Currency> for &'a f64

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<Currency> for &'a i16

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<Currency> for &'a i32

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<Currency> for &'a i64

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<Currency> for &'a i8

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<Currency> for &'a isize

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<Currency> for &'a u16

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<Currency> for &'a u32

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<Currency> for &'a u64

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<Currency> for &'a u8

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<Currency> for &'a usize

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> Currency

Performs the / operation. Read more
Source§

impl Div<Currency> for BigUint

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> Currency

Performs the / operation. Read more
Source§

impl Div<Currency> for f32

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> Currency

Performs the / operation. Read more
Source§

impl Div<Currency> for f64

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> Currency

Performs the / operation. Read more
Source§

impl Div<Currency> for i16

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> Currency

Performs the / operation. Read more
Source§

impl Div<Currency> for i32

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> Currency

Performs the / operation. Read more
Source§

impl Div<Currency> for i64

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> Currency

Performs the / operation. Read more
Source§

impl Div<Currency> for i8

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> Currency

Performs the / operation. Read more
Source§

impl Div<Currency> for isize

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> Currency

Performs the / operation. Read more
Source§

impl Div<Currency> for u16

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> Currency

Performs the / operation. Read more
Source§

impl Div<Currency> for u32

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> Currency

Performs the / operation. Read more
Source§

impl Div<Currency> for u64

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> Currency

Performs the / operation. Read more
Source§

impl Div<Currency> for u8

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> Currency

Performs the / operation. Read more
Source§

impl Div<Currency> for usize

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<f32> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: f32) -> Currency

Performs the / operation. Read more
Source§

impl Div<f32> for Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: f32) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<f64> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: f64) -> Currency

Performs the / operation. Read more
Source§

impl Div<f64> for Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: f64) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<i16> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: i16) -> Currency

Performs the / operation. Read more
Source§

impl Div<i16> for Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: i16) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<i32> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: i32) -> Currency

Performs the / operation. Read more
Source§

impl Div<i32> for Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: i32) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<i64> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: i64) -> Currency

Performs the / operation. Read more
Source§

impl Div<i64> for Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: i64) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<i8> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: i8) -> Currency

Performs the / operation. Read more
Source§

impl Div<i8> for Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: i8) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<isize> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: isize) -> Currency

Performs the / operation. Read more
Source§

impl Div<isize> for Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: isize) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<u16> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: u16) -> Currency

Performs the / operation. Read more
Source§

impl Div<u16> for Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: u16) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<u32> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: u32) -> Currency

Performs the / operation. Read more
Source§

impl Div<u32> for Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: u32) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<u64> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: u64) -> Currency

Performs the / operation. Read more
Source§

impl Div<u64> for Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: u64) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<u8> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: u8) -> Currency

Performs the / operation. Read more
Source§

impl Div<u8> for Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: u8) -> Currency

Performs the / operation. Read more
Source§

impl<'a> Div<usize> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: usize) -> Currency

Performs the / operation. Read more
Source§

impl Div<usize> for Currency

Source§

type Output = Currency

The resulting type after applying the / operator.
Source§

fn div(self, other: usize) -> Currency

Performs the / operation. Read more
Source§

impl Div for Currency

Overloads the ‘/’ operator between two owned Currency objects.

§Panics

Panics if they aren’t the same type of currency, as denoted by the currency’s symbol.

Source§

type Output = BigInt

The resulting type after applying the / operator.
Source§

fn div(self, other: Currency) -> BigInt

Performs the / operation. Read more
Source§

impl FromStr for Currency

Source§

type Err = ParseCurrencyError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Currency, ParseCurrencyError>

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

impl Hash for Currency

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

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

impl LowerExp for Currency

Identical to the implementation of Display, but replaces the “.” with a “,”. Access this formatting by using “{:e}”.

§Example

use currency::Currency;

let euros = Currency::from_str("£1000,99").unwrap();
println!("{:e}", euros);

Which prints:

"£1.000,99"
Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, 'b> Mul<&'b BigUint> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b BigUint) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a BigUint> for Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a BigUint) -> Currency

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'b Currency> for &'a BigUint

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'b Currency> for &'a f32

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'b Currency> for &'a f64

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'b Currency> for &'a i16

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'b Currency> for &'a i32

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'b Currency> for &'a i64

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'b Currency> for &'a i8

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'b Currency> for &'a isize

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'b Currency> for &'a u16

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'b Currency> for &'a u32

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'b Currency> for &'a u64

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'b Currency> for &'a u8

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'b Currency> for &'a usize

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a Currency> for BigUint

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a Currency> for f32

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a Currency> for f64

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a Currency> for i16

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a Currency> for i32

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a Currency> for i64

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a Currency> for i8

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a Currency> for isize

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a Currency> for u16

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a Currency> for u32

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a Currency> for u64

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a Currency> for u8

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a Currency> for usize

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'b f32> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b f32) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a f32> for Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a f32) -> Currency

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'b f64> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b f64) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a f64> for Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a f64) -> Currency

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'b i16> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b i16) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a i16> for Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a i16) -> Currency

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'b i32> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b i32) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a i32> for Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a i32) -> Currency

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'b i64> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b i64) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a i64> for Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a i64) -> Currency

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'b i8> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b i8) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a i8> for Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a i8) -> Currency

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'b isize> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b isize) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a isize> for Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a isize) -> Currency

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'b u16> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b u16) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a u16> for Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a u16) -> Currency

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'b u32> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b u32) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a u32> for Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a u32) -> Currency

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'b u64> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b u64) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a u64> for Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a u64) -> Currency

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'b u8> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b u8) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a u8> for Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a u8) -> Currency

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'b usize> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b usize) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a usize> for Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a usize) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<BigUint> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: BigUint) -> Currency

Performs the * operation. Read more
Source§

impl Mul<BigUint> for Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: BigUint) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<Currency> for &'a BigUint

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<Currency> for &'a f32

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<Currency> for &'a f64

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<Currency> for &'a i16

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<Currency> for &'a i32

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<Currency> for &'a i64

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<Currency> for &'a i8

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<Currency> for &'a isize

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<Currency> for &'a u16

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<Currency> for &'a u32

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<Currency> for &'a u64

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<Currency> for &'a u8

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<Currency> for &'a usize

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: Currency) -> Currency

Performs the * operation. Read more
Source§

impl Mul<Currency> for BigUint

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: Currency) -> Currency

Performs the * operation. Read more
Source§

impl Mul<Currency> for f32

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: Currency) -> Currency

Performs the * operation. Read more
Source§

impl Mul<Currency> for f64

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: Currency) -> Currency

Performs the * operation. Read more
Source§

impl Mul<Currency> for i16

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: Currency) -> Currency

Performs the * operation. Read more
Source§

impl Mul<Currency> for i32

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: Currency) -> Currency

Performs the * operation. Read more
Source§

impl Mul<Currency> for i64

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: Currency) -> Currency

Performs the * operation. Read more
Source§

impl Mul<Currency> for i8

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: Currency) -> Currency

Performs the * operation. Read more
Source§

impl Mul<Currency> for isize

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: Currency) -> Currency

Performs the * operation. Read more
Source§

impl Mul<Currency> for u16

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: Currency) -> Currency

Performs the * operation. Read more
Source§

impl Mul<Currency> for u32

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: Currency) -> Currency

Performs the * operation. Read more
Source§

impl Mul<Currency> for u64

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: Currency) -> Currency

Performs the * operation. Read more
Source§

impl Mul<Currency> for u8

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: Currency) -> Currency

Performs the * operation. Read more
Source§

impl Mul<Currency> for usize

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: Currency) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<f32> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: f32) -> Currency

Performs the * operation. Read more
Source§

impl Mul<f32> for Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: f32) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<f64> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: f64) -> Currency

Performs the * operation. Read more
Source§

impl Mul<f64> for Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: f64) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<i16> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: i16) -> Currency

Performs the * operation. Read more
Source§

impl Mul<i16> for Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: i16) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<i32> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: i32) -> Currency

Performs the * operation. Read more
Source§

impl Mul<i32> for Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: i32) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<i64> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: i64) -> Currency

Performs the * operation. Read more
Source§

impl Mul<i64> for Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: i64) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<i8> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: i8) -> Currency

Performs the * operation. Read more
Source§

impl Mul<i8> for Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: i8) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<isize> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: isize) -> Currency

Performs the * operation. Read more
Source§

impl Mul<isize> for Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: isize) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<u16> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: u16) -> Currency

Performs the * operation. Read more
Source§

impl Mul<u16> for Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: u16) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<u32> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: u32) -> Currency

Performs the * operation. Read more
Source§

impl Mul<u32> for Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: u32) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<u64> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: u64) -> Currency

Performs the * operation. Read more
Source§

impl Mul<u64> for Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: u64) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<u8> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: u8) -> Currency

Performs the * operation. Read more
Source§

impl Mul<u8> for Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: u8) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Mul<usize> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: usize) -> Currency

Performs the * operation. Read more
Source§

impl Mul<usize> for Currency

Source§

type Output = Currency

The resulting type after applying the * operator.
Source§

fn mul(self, other: usize) -> Currency

Performs the * operation. Read more
Source§

impl<'a> Neg for &'a Currency

Source§

type Output = Currency

The resulting type after applying the - operator.
Source§

fn neg(self) -> Currency

Performs the unary - operation. Read more
Source§

impl Neg for Currency

Source§

type Output = Currency

The resulting type after applying the - operator.
Source§

fn neg(self) -> Currency

Performs the unary - operation. Read more
Source§

impl PartialEq for Currency

Source§

fn eq(&self, other: &Currency) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Currency

Source§

fn partial_cmp(&self, other: &Currency) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a, 'b> Sub<&'b Currency> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the - operator.
Source§

fn sub(self, other: &'b Currency) -> Currency

Performs the - operation. Read more
Source§

impl<'a> Sub<&'a Currency> for Currency

Source§

type Output = Currency

The resulting type after applying the - operator.
Source§

fn sub(self, other: &'a Currency) -> Currency

Performs the - operation. Read more
Source§

impl<'a> Sub<Currency> for &'a Currency

Source§

type Output = Currency

The resulting type after applying the - operator.
Source§

fn sub(self, other: Currency) -> Currency

Performs the - operation. Read more
Source§

impl Sub for Currency

Source§

type Output = Currency

The resulting type after applying the - operator.
Source§

fn sub(self, other: Currency) -> Currency

Performs the - operation. Read more
Source§

impl Eq for Currency

Source§

impl StructuralPartialEq for Currency

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.