[−][src]Struct shopless_database::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.
fn add(self, other: Cents) -> Cents
[src]
impl AddAssign<Cents> for Cents
[src]
fn add_assign(&mut self, other: 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<'de> Deserialize<'de> for Cents
[src]
fn deserialize<D>(deserializer: D) -> Result<Cents, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Display for Cents
[src]
impl Div<Cents> for Cents
[src]
type Output = Cents
The resulting type after applying the /
operator.
fn div(self, rhs: Cents) -> Self::Output
[src]
impl<'q> Encode<'q, Postgres> for Cents
[src]
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
[src]
#[must_use]fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
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.
fn from_str(value: &str) -> Result<Cents, Self::Err>
[src]
impl Into<Decimal> for Cents
[src]
impl Mul<Cents> for Cents
[src]
type Output = Cents
The resulting type after applying the *
operator.
fn mul(self, rhs: Cents) -> Self::Output
[src]
impl One for Cents
[src]
fn one() -> Cents
[src]
fn set_one(&mut self)
[src]
fn is_one(&self) -> bool where
Self: PartialEq<Self>,
[src]
Self: PartialEq<Self>,
impl PartialEq<Cents> for Cents
[src]
impl PartialOrd<Cents> for Cents
[src]
fn partial_cmp(&self, other: &Cents) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for Cents
[src]
impl Sub<Cents> for Cents
[src]
type Output = Cents
The resulting type after applying the -
operator.
fn sub(self, rhs: Cents) -> Self::Output
[src]
impl SubAssign<Cents> for Cents
[src]
fn sub_assign(&mut self, other: Cents)
[src]
impl Type<Postgres> for Cents
[src]
fn type_info() -> PgTypeInfo
[src]
fn compatible(ty: &<DB as Database>::TypeInfo) -> bool
impl Zero for Cents
[src]
Auto Trait Implementations
impl RefUnwindSafe for Cents
impl Send for Cents
impl Sync for Cents
impl Unpin for Cents
impl UnwindSafe for Cents
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,