Struct greenback::Greenback
[−]
[src]
pub struct Greenback { /* fields omitted */ }
Methods
impl Greenback
[src]
fn new(dollars: i32, cents: i32) -> Greenback
[src]
fn from_cents(cents: i32) -> Greenback
[src]
fn from_float(f: f32) -> Greenback
[src]
fn zero() -> Greenback
[src]
fn dollars(&self) -> i32
[src]
fn cents(&self) -> i32
[src]
fn raw_value(&self) -> i32
[src]
Trait Implementations
impl Add for Greenback
[src]
type Output = Greenback
The resulting type after applying the +
operator.
fn add(self, rhs: Greenback) -> Greenback
[src]
Performs the +
operation.
impl Sub for Greenback
[src]
type Output = Greenback
The resulting type after applying the -
operator.
fn sub(self, rhs: Greenback) -> Greenback
[src]
Performs the -
operation.
impl Mul<i32> for Greenback
[src]
type Output = Greenback
The resulting type after applying the *
operator.
fn mul(self, rhs: i32) -> Greenback
[src]
Performs the *
operation.
impl Div<i32> for Greenback
[src]
type Output = Greenback
The resulting type after applying the /
operator.
fn div(self, rhs: i32) -> Greenback
[src]
Performs the /
operation.
impl AddAssign for Greenback
[src]
fn add_assign(&mut self, rhs: Greenback)
[src]
Performs the +=
operation.
impl SubAssign for Greenback
[src]
fn sub_assign(&mut self, rhs: Greenback)
[src]
Performs the -=
operation.
impl MulAssign<i32> for Greenback
[src]
fn mul_assign(&mut self, rhs: i32)
[src]
Performs the *=
operation.
impl DivAssign<i32> for Greenback
[src]
fn div_assign(&mut self, rhs: i32)
[src]
Performs the /=
operation.
impl PartialEq for Greenback
[src]
fn eq(&self, rhs: &Greenback) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, rhs: &Greenback) -> bool
[src]
This method tests for !=
.
impl Sum for Greenback
[src]
fn sum<I>(iter: I) -> Greenback where
I: Iterator<Item = Greenback>,
[src]
I: Iterator<Item = Greenback>,
Method which takes an iterator and generates Self
from the elements by "summing up" the items. Read more
impl PartialOrd for Greenback
[src]
fn partial_cmp(&self, rhs: &Greenback) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, rhs: &Greenback) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, rhs: &Greenback) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, rhs: &Greenback) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, rhs: &Greenback) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Eq for Greenback
[src]
impl Ord for Greenback
[src]
fn cmp(&self, other: &Greenback) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
Compares and returns the minimum of two values. Read more
impl Display for Greenback
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more