[][src]Struct shopless_database::Cents

pub struct Cents(_);

Implementations

impl Cents[src]

pub fn new(num: i64, scale: u32) -> Self[src]

pub fn round(&self) -> Cents[src]

pub fn scale(&self) -> u32[src]

pub fn to_cents(&self) -> i64[src]

Trait Implementations

impl Add<Cents> for Cents[src]

type Output = Cents

The resulting type after applying the + operator.

impl AddAssign<Cents> for Cents[src]

impl Clone for Cents[src]

impl Copy for Cents[src]

impl Debug for Cents[src]

impl<'r> Decode<'r, Postgres> for Cents[src]

impl Default for Cents[src]

impl<'de> Deserialize<'de> for Cents[src]

impl Display for Cents[src]

impl Div<Cents> for Cents[src]

type Output = Cents

The resulting type after applying the / operator.

impl<'q> Encode<'q, Postgres> for Cents[src]

impl Eq for Cents[src]

impl From<Decimal> for Cents[src]

impl From<i32> for Cents[src]

impl FromStr for Cents[src]

type Err = DecimalError

The associated error which can be returned from parsing.

impl Into<Decimal> for Cents[src]

impl Mul<Cents> for Cents[src]

type Output = Cents

The resulting type after applying the * operator.

impl Neg for Cents[src]

type Output = Self

The resulting type after applying the - operator.

impl One for Cents[src]

impl Ord for Cents[src]

impl PartialEq<Cents> for Cents[src]

impl PartialOrd<Cents> for Cents[src]

impl Serialize for Cents[src]

impl StructuralEq for Cents[src]

impl StructuralPartialEq for Cents[src]

impl Sub<Cents> for Cents[src]

type Output = Cents

The resulting type after applying the - operator.

impl SubAssign<Cents> for Cents[src]

impl Sum<Cents> for Cents[src]

impl Type<Postgres> for Cents[src]

impl Zero for Cents[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,