[][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 PartialEq<PgNumeric> for PgNumeric[src]

impl<__ST, __DB> Queryable<__ST, __DB> for PgNumeric where
    __DB: Backend,
    __ST: SingleValue,
    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]

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

type Error = Box<dyn Error + Send + Sync>

The type returned in the event of a conversion error.

impl TryFrom<PgNumeric> for BigDecimal[src]

type Error = Box<dyn Error + Send + Sync>

The type returned in the event of a conversion error.

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, ST> AsExpression<ST> for T where
    ST: SqlType + IntoNotNullable + TypedExpressionType,
    T: Expression,
    <ST as IntoNotNullable>::NotNullable: SingleValue,
    ExpressionImplHelper<T, <ST as SqlType>::IsNull, <<T as Expression>::SqlType as SqlType>::IsNull>: AsExpressionHelper<ST>,
    <T as Expression>::SqlType: SqlType
[src]

type Expression = <ExpressionImplHelper<T, <ST as SqlType>::IsNull, <<T as Expression>::SqlType as SqlType>::IsNull> as AsExpressionHelper<ST>>::Expression

The expression being returned

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, ST, DB> FromSqlRow<ST, DB> for T where
    DB: Backend,
    ST: SqlType,
    T: Queryable<ST, DB>,
    <T as Queryable<ST, DB>>::Row: FromStaticSqlRow<ST, DB>, 
[src]

impl<T, ST, DB> FromStaticSqlRow<ST, DB> for T where
    DB: Backend,
    ST: SingleValue,
    T: FromSql<ST, DB>, 
[src]

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

impl<T> IntoSql for T[src]

impl<T, ST, DB> StaticallySizedRow<ST, DB> for T where
    DB: Backend,
    ST: SqlType + TupleSize,
    T: Queryable<ST, DB>, 
[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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]