[][src]Enum diesel::pg::data_types::PgNumeric

pub enum PgNumeric {
    Positive {
        weight: i16,
        scale: u16,
        digits: Vec<i16>,
    },
    Negative {
        weight: i16,
        scale: u16,
        digits: Vec<i16>,
    },
    NaN,
}

Represents a NUMERIC value, closely mirroring the PG wire protocol representation

Variants

Positive

A positive number

Fields of Positive

weight: i16

How many digits come before the decimal point?

scale: u16

How many significant digits are there?

digits: Vec<i16>

The digits in this number, stored in base 10000

Negative

A negative number

Fields of Negative

weight: i16

How many digits come before the decimal point?

scale: u16

How many significant digits are there?

digits: Vec<i16>

The digits in this number, stored in base 10000

NaN

Not a number

Trait Implementations

impl Arbitrary for PgNumeric[src]

impl<'expr> AsExpression<Nullable<Numeric>> for &'expr PgNumeric[src]

type Expression = Bound<Nullable<Numeric>, Self>

The expression being returned

impl AsExpression<Nullable<Numeric>> for PgNumeric[src]

type Expression = Bound<Nullable<Numeric>, Self>

The expression being returned

impl<'expr> AsExpression<Numeric> for &'expr PgNumeric[src]

type Expression = Bound<Numeric, Self>

The expression being returned

impl AsExpression<Numeric> for PgNumeric[src]

type Expression = Bound<Numeric, Self>

The expression being returned

impl Clone for PgNumeric[src]

impl Debug for PgNumeric[src]

impl Eq for PgNumeric[src]

impl<'a> From<&'a BigDecimal> for PgNumeric[src]

impl From<BigDecimal> for PgNumeric[src]

impl FromSql<Numeric, Pg> for PgNumeric[src]

impl<__ST, __DB> FromSqlRow<__ST, __DB> for PgNumeric where
    __DB: Backend,
    Self: FromSql<__ST, __DB>, 
[src]

impl PartialEq<PgNumeric> for PgNumeric[src]

impl<__ST, __DB> Queryable<__ST, __DB> for PgNumeric where
    __DB: Backend,
    Self: FromSql<__ST, __DB>, 
[src]

type Row = Self

The Rust type you'd like to map from. Read more

impl StructuralEq for PgNumeric[src]

impl StructuralPartialEq for PgNumeric[src]

impl<__DB> ToSql<Nullable<Numeric>, __DB> for PgNumeric where
    __DB: Backend,
    Self: ToSql<Numeric, __DB>, 
[src]

impl ToSql<Numeric, Pg> for PgNumeric[src]

Auto Trait Implementations

impl RefUnwindSafe for PgNumeric

impl Send for PgNumeric

impl Sync for PgNumeric

impl Unpin for PgNumeric

impl UnwindSafe for PgNumeric

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> From<T> for T[src]

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

impl<T> IntoSql for T[src]

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

type Owned = T

The resulting type after obtaining ownership.

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.