Struct currency::Currency
[−]
[src]
pub struct Currency { /* fields omitted */ }
Represents currency through an optional symbol and amount of coin.
Every 100 coins represents a banknote. (coin: 100 => 1.00)
Methods
impl Currency
[src]
fn new() -> Self
Creates a blank Currency with no symbol and 0 coin.
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());
fn sign(&self) -> Sign
Returns the Sign
of the BigInt
holding the coins.
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); }
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
impl Debug for Currency
[src]
impl Clone for Currency
[src]
fn clone(&self) -> Currency
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Hash for Currency
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Default for Currency
[src]
impl PartialEq for Currency
[src]
fn eq(&self, __arg_0: &Currency) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Currency) -> bool
This method tests for !=
.
impl Eq for Currency
[src]
impl PartialOrd for Currency
[src]
fn partial_cmp(&self, __arg_0: &Currency) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Currency) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Currency) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Currency) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Currency) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Display for Currency
[src]
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");
impl FromStr for Currency
[src]
type Err = ParseCurrencyError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Currency, ParseCurrencyError>
Parses a string s
to return a value of this type. Read more
impl LowerExp for Currency
[src]
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:
text "£1.000,99"
impl<'a, 'b> Add<&'b Currency> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the +
operator
fn add(self, other: &'b Currency) -> Currency
The method for the +
operator
impl<'a> Add<Currency> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the +
operator
fn add(self, other: Currency) -> Currency
The method for the +
operator
impl<'a> Add<&'a Currency> for Currency
[src]
type Output = Currency
The resulting type after applying the +
operator
fn add(self, other: &'a Currency) -> Currency
The method for the +
operator
impl Add<Currency> for Currency
[src]
type Output = Currency
The resulting type after applying the +
operator
fn add(self, other: Currency) -> Currency
The method for the +
operator
impl<'a, 'b> Sub<&'b Currency> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the -
operator
fn sub(self, other: &'b Currency) -> Currency
The method for the -
operator
impl<'a> Sub<Currency> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the -
operator
fn sub(self, other: Currency) -> Currency
The method for the -
operator
impl<'a> Sub<&'a Currency> for Currency
[src]
type Output = Currency
The resulting type after applying the -
operator
fn sub(self, other: &'a Currency) -> Currency
The method for the -
operator
impl Sub<Currency> for Currency
[src]
type Output = Currency
The resulting type after applying the -
operator
fn sub(self, other: Currency) -> Currency
The method for the -
operator
impl<'a, 'b> Mul<&'b BigUint> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: &'b BigUint) -> Currency
The method for the *
operator
impl<'a> Mul<BigUint> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: BigUint) -> Currency
The method for the *
operator
impl<'a> Mul<&'a BigUint> for Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: &'a BigUint) -> Currency
The method for the *
operator
impl Mul<BigUint> for Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: BigUint) -> Currency
The method for the *
operator
impl<'a, 'b> Mul<&'b u8> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: &'b u8) -> Currency
The method for the *
operator
impl<'a> Mul<u8> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: u8) -> Currency
The method for the *
operator
impl<'a> Mul<&'a u8> for Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: &'a u8) -> Currency
The method for the *
operator
impl Mul<u8> for Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: u8) -> Currency
The method for the *
operator
impl<'a, 'b> Mul<&'b u16> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: &'b u16) -> Currency
The method for the *
operator
impl<'a> Mul<u16> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: u16) -> Currency
The method for the *
operator
impl<'a> Mul<&'a u16> for Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: &'a u16) -> Currency
The method for the *
operator
impl Mul<u16> for Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: u16) -> Currency
The method for the *
operator
impl<'a, 'b> Mul<&'b u32> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: &'b u32) -> Currency
The method for the *
operator
impl<'a> Mul<u32> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: u32) -> Currency
The method for the *
operator
impl<'a> Mul<&'a u32> for Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: &'a u32) -> Currency
The method for the *
operator
impl Mul<u32> for Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: u32) -> Currency
The method for the *
operator
impl<'a, 'b> Mul<&'b u64> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: &'b u64) -> Currency
The method for the *
operator
impl<'a> Mul<u64> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: u64) -> Currency
The method for the *
operator
impl<'a> Mul<&'a u64> for Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: &'a u64) -> Currency
The method for the *
operator
impl Mul<u64> for Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: u64) -> Currency
The method for the *
operator
impl<'a, 'b> Mul<&'b usize> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: &'b usize) -> Currency
The method for the *
operator
impl<'a> Mul<usize> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: usize) -> Currency
The method for the *
operator
impl<'a> Mul<&'a usize> for Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: &'a usize) -> Currency
The method for the *
operator
impl Mul<usize> for Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: usize) -> Currency
The method for the *
operator
impl<'a, 'b> Mul<&'b i8> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: &'b i8) -> Currency
The method for the *
operator
impl<'a> Mul<i8> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: i8) -> Currency
The method for the *
operator
impl<'a> Mul<&'a i8> for Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: &'a i8) -> Currency
The method for the *
operator
impl Mul<i8> for Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: i8) -> Currency
The method for the *
operator
impl<'a, 'b> Mul<&'b i16> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: &'b i16) -> Currency
The method for the *
operator
impl<'a> Mul<i16> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: i16) -> Currency
The method for the *
operator
impl<'a> Mul<&'a i16> for Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: &'a i16) -> Currency
The method for the *
operator
impl Mul<i16> for Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: i16) -> Currency
The method for the *
operator
impl<'a, 'b> Mul<&'b i32> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: &'b i32) -> Currency
The method for the *
operator
impl<'a> Mul<i32> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: i32) -> Currency
The method for the *
operator
impl<'a> Mul<&'a i32> for Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: &'a i32) -> Currency
The method for the *
operator
impl Mul<i32> for Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: i32) -> Currency
The method for the *
operator
impl<'a, 'b> Mul<&'b i64> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: &'b i64) -> Currency
The method for the *
operator
impl<'a> Mul<i64> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: i64) -> Currency
The method for the *
operator
impl<'a> Mul<&'a i64> for Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: &'a i64) -> Currency
The method for the *
operator
impl Mul<i64> for Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: i64) -> Currency
The method for the *
operator
impl<'a, 'b> Mul<&'b isize> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: &'b isize) -> Currency
The method for the *
operator
impl<'a> Mul<isize> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: isize) -> Currency
The method for the *
operator
impl<'a> Mul<&'a isize> for Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: &'a isize) -> Currency
The method for the *
operator
impl Mul<isize> for Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: isize) -> Currency
The method for the *
operator
impl<'a, 'b> Div<&'b BigUint> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: &'b BigUint) -> Currency
The method for the /
operator
impl<'a> Div<BigUint> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: BigUint) -> Currency
The method for the /
operator
impl<'a> Div<&'a BigUint> for Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: &'a BigUint) -> Currency
The method for the /
operator
impl Div<BigUint> for Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: BigUint) -> Currency
The method for the /
operator
impl<'a, 'b> Div<&'b u8> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: &'b u8) -> Currency
The method for the /
operator
impl<'a> Div<u8> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: u8) -> Currency
The method for the /
operator
impl<'a> Div<&'a u8> for Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: &'a u8) -> Currency
The method for the /
operator
impl Div<u8> for Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: u8) -> Currency
The method for the /
operator
impl<'a, 'b> Div<&'b u16> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: &'b u16) -> Currency
The method for the /
operator
impl<'a> Div<u16> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: u16) -> Currency
The method for the /
operator
impl<'a> Div<&'a u16> for Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: &'a u16) -> Currency
The method for the /
operator
impl Div<u16> for Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: u16) -> Currency
The method for the /
operator
impl<'a, 'b> Div<&'b u32> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: &'b u32) -> Currency
The method for the /
operator
impl<'a> Div<u32> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: u32) -> Currency
The method for the /
operator
impl<'a> Div<&'a u32> for Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: &'a u32) -> Currency
The method for the /
operator
impl Div<u32> for Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: u32) -> Currency
The method for the /
operator
impl<'a, 'b> Div<&'b u64> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: &'b u64) -> Currency
The method for the /
operator
impl<'a> Div<u64> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: u64) -> Currency
The method for the /
operator
impl<'a> Div<&'a u64> for Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: &'a u64) -> Currency
The method for the /
operator
impl Div<u64> for Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: u64) -> Currency
The method for the /
operator
impl<'a, 'b> Div<&'b usize> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: &'b usize) -> Currency
The method for the /
operator
impl<'a> Div<usize> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: usize) -> Currency
The method for the /
operator
impl<'a> Div<&'a usize> for Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: &'a usize) -> Currency
The method for the /
operator
impl Div<usize> for Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: usize) -> Currency
The method for the /
operator
impl<'a, 'b> Div<&'b i8> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: &'b i8) -> Currency
The method for the /
operator
impl<'a> Div<i8> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: i8) -> Currency
The method for the /
operator
impl<'a> Div<&'a i8> for Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: &'a i8) -> Currency
The method for the /
operator
impl Div<i8> for Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: i8) -> Currency
The method for the /
operator
impl<'a, 'b> Div<&'b i16> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: &'b i16) -> Currency
The method for the /
operator
impl<'a> Div<i16> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: i16) -> Currency
The method for the /
operator
impl<'a> Div<&'a i16> for Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: &'a i16) -> Currency
The method for the /
operator
impl Div<i16> for Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: i16) -> Currency
The method for the /
operator
impl<'a, 'b> Div<&'b i32> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: &'b i32) -> Currency
The method for the /
operator
impl<'a> Div<i32> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: i32) -> Currency
The method for the /
operator
impl<'a> Div<&'a i32> for Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: &'a i32) -> Currency
The method for the /
operator
impl Div<i32> for Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: i32) -> Currency
The method for the /
operator
impl<'a, 'b> Div<&'b i64> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: &'b i64) -> Currency
The method for the /
operator
impl<'a> Div<i64> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: i64) -> Currency
The method for the /
operator
impl<'a> Div<&'a i64> for Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: &'a i64) -> Currency
The method for the /
operator
impl Div<i64> for Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: i64) -> Currency
The method for the /
operator
impl<'a, 'b> Div<&'b isize> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: &'b isize) -> Currency
The method for the /
operator
impl<'a> Div<isize> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: isize) -> Currency
The method for the /
operator
impl<'a> Div<&'a isize> for Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: &'a isize) -> Currency
The method for the /
operator
impl Div<isize> for Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: isize) -> Currency
The method for the /
operator
impl<'a, 'b> Mul<&'b f32> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: &'b f32) -> Currency
The method for the *
operator
impl<'a> Mul<f32> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: f32) -> Currency
The method for the *
operator
impl<'a> Mul<&'a f32> for Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: &'a f32) -> Currency
The method for the *
operator
impl Mul<f32> for Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: f32) -> Currency
The method for the *
operator
impl<'a, 'b> Mul<&'b f64> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: &'b f64) -> Currency
The method for the *
operator
impl<'a> Mul<f64> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: f64) -> Currency
The method for the *
operator
impl<'a> Mul<&'a f64> for Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: &'a f64) -> Currency
The method for the *
operator
impl Mul<f64> for Currency
[src]
type Output = Currency
The resulting type after applying the *
operator
fn mul(self, other: f64) -> Currency
The method for the *
operator
impl<'a, 'b> Div<&'b f32> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: &'b f32) -> Currency
The method for the /
operator
impl<'a> Div<f32> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: f32) -> Currency
The method for the /
operator
impl<'a> Div<&'a f32> for Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: &'a f32) -> Currency
The method for the /
operator
impl Div<f32> for Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: f32) -> Currency
The method for the /
operator
impl<'a, 'b> Div<&'b f64> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: &'b f64) -> Currency
The method for the /
operator
impl<'a> Div<f64> for &'a Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: f64) -> Currency
The method for the /
operator
impl<'a> Div<&'a f64> for Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: &'a f64) -> Currency
The method for the /
operator
impl Div<f64> for Currency
[src]
type Output = Currency
The resulting type after applying the /
operator
fn div(self, other: f64) -> Currency
The method for the /
operator
impl<'a, 'b> Div<&'b Currency> for &'a Currency
[src]
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.
type Output = BigInt
The resulting type after applying the /
operator
fn div(self, other: &'b Currency) -> BigInt
The method for the /
operator
impl<'a> Div<Currency> for &'a Currency
[src]
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.
type Output = BigInt
The resulting type after applying the /
operator
fn div(self, other: Currency) -> BigInt
The method for the /
operator
impl<'a> Div<&'a Currency> for Currency
[src]
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.
type Output = BigInt
The resulting type after applying the /
operator
fn div(self, other: &'a Currency) -> BigInt
The method for the /
operator
impl Div<Currency> for Currency
[src]
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.
type Output = BigInt
The resulting type after applying the /
operator
fn div(self, other: Currency) -> BigInt
The method for the /
operator
impl Neg for Currency
[src]
type Output = Currency
The resulting type after applying the -
operator
fn neg(self) -> Currency
The method for the unary -
operator