pub enum PgNumeric {
Positive {
weight: i16,
scale: u16,
digits: Vec<i16>,
},
Negative {
weight: i16,
scale: u16,
digits: Vec<i16>,
},
NaN,
}
postgres_backend
only.Expand description
Represents a NUMERIC value, closely mirroring the PG wire protocol representation
Variants
Positive
Fields
weight: i16
How many digits come before the decimal point?
scale: u16
How many significant digits are there?
A positive number
Negative
Fields
weight: i16
How many digits come before the decimal point?
scale: u16
How many significant digits are there?
A negative number
NaN
Not a number
Trait Implementations
sourceimpl<'expr> AsExpression<Nullable<Numeric>> for &'expr PgNumeric
impl<'expr> AsExpression<Nullable<Numeric>> for &'expr PgNumeric
type Expression = Bound<Nullable<Numeric>, &'expr PgNumeric>
type Expression = Bound<Nullable<Numeric>, &'expr PgNumeric>
The expression being returned
sourcefn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
sourceimpl AsExpression<Nullable<Numeric>> for PgNumeric
impl AsExpression<Nullable<Numeric>> for PgNumeric
type Expression = Bound<Nullable<Numeric>, PgNumeric>
type Expression = Bound<Nullable<Numeric>, PgNumeric>
The expression being returned
sourcefn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
sourceimpl<'expr> AsExpression<Numeric> for &'expr PgNumeric
impl<'expr> AsExpression<Numeric> for &'expr PgNumeric
type Expression = Bound<Numeric, &'expr PgNumeric>
type Expression = Bound<Numeric, &'expr PgNumeric>
The expression being returned
sourcefn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
sourceimpl AsExpression<Numeric> for PgNumeric
impl AsExpression<Numeric> for PgNumeric
type Expression = Bound<Numeric, PgNumeric>
type Expression = Bound<Numeric, PgNumeric>
The expression being returned
sourcefn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
sourceimpl<'a> From<&'a BigDecimal> for PgNumeric
Available on crate feature bigdecimal
only.
impl<'a> From<&'a BigDecimal> for PgNumeric
bigdecimal
only.sourcefn from(decimal: &'a BigDecimal) -> Self
fn from(decimal: &'a BigDecimal) -> Self
Converts to this type from the input type.
sourceimpl From<BigDecimal> for PgNumeric
Available on crate feature bigdecimal
only.
impl From<BigDecimal> for PgNumeric
bigdecimal
only.sourcefn from(bigdecimal: BigDecimal) -> Self
fn from(bigdecimal: BigDecimal) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<PgNumeric> for PgNumeric
impl PartialEq<PgNumeric> for PgNumeric
sourceimpl<__ST, __DB> Queryable<__ST, __DB> for PgNumeric where
__DB: Backend,
__ST: SingleValue,
Self: FromSql<__ST, __DB>,
impl<__ST, __DB> Queryable<__ST, __DB> for PgNumeric where
__DB: Backend,
__ST: SingleValue,
Self: FromSql<__ST, __DB>,
sourceimpl<__DB> ToSql<Nullable<Numeric>, __DB> for PgNumeric where
__DB: Backend,
Self: ToSql<Numeric, __DB>,
impl<__DB> ToSql<Nullable<Numeric>, __DB> for PgNumeric where
__DB: Backend,
Self: ToSql<Numeric, __DB>,
sourceimpl<'a> TryFrom<&'a PgNumeric> for BigDecimal
Available on crate feature bigdecimal
only.
impl<'a> TryFrom<&'a PgNumeric> for BigDecimal
bigdecimal
only.sourceimpl TryFrom<PgNumeric> for BigDecimal
Available on crate feature bigdecimal
only.
impl TryFrom<PgNumeric> for BigDecimal
bigdecimal
only.impl Eq for PgNumeric
impl StructuralEq for PgNumeric
impl StructuralPartialEq for PgNumeric
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T, ST, DB> FromSqlRow<ST, DB> for T where
T: Queryable<ST, DB>,
ST: SqlTypeOrSelectable,
DB: Backend,
<T as Queryable<ST, DB>>::Row: FromStaticSqlRow<ST, DB>,
impl<T, ST, DB> FromSqlRow<ST, DB> for T where
T: Queryable<ST, DB>,
ST: SqlTypeOrSelectable,
DB: Backend,
<T as Queryable<ST, DB>>::Row: FromStaticSqlRow<ST, DB>,
sourceimpl<T, ST, DB> FromStaticSqlRow<ST, DB> for T where
DB: Backend,
T: FromSql<ST, DB>,
ST: SingleValue,
impl<T, ST, DB> FromStaticSqlRow<ST, DB> for T where
DB: Backend,
T: FromSql<ST, DB>,
ST: SingleValue,
sourceimpl<T> IntoSql for T
impl<T> IntoSql for T
sourcefn into_sql<T>(self) -> AsExprOf<Self, T> where
Self: AsExpression<T> + Sized,
T: SqlType + TypedExpressionType,
fn into_sql<T>(self) -> AsExprOf<Self, T> where
Self: AsExpression<T> + Sized,
T: SqlType + TypedExpressionType,
Convert self
to an expression for Diesel’s query builder. Read more
sourcefn as_sql<'a, T>(&'a self) -> AsExprOf<&'a Self, T> where
&'a Self: AsExpression<T>,
T: SqlType + TypedExpressionType,
fn as_sql<'a, T>(&'a self) -> AsExprOf<&'a Self, T> where
&'a Self: AsExpression<T>,
T: SqlType + TypedExpressionType,
Convert &self
to an expression for Diesel’s query builder. Read more
sourceimpl<T, ST, DB> StaticallySizedRow<ST, DB> for T where
ST: SqlTypeOrSelectable + TupleSize,
T: Queryable<ST, DB>,
DB: Backend,
impl<T, ST, DB> StaticallySizedRow<ST, DB> for T where
ST: SqlTypeOrSelectable + TupleSize,
T: Queryable<ST, DB>,
DB: Backend,
sourceconst FIELD_COUNT: usize =
const FIELD_COUNT: usize =
The number of fields that this type will consume.