Enum diesel::pg::data_types::PgNumeric
source · pub enum PgNumeric {
Positive {
weight: i16,
scale: u16,
digits: Vec<i16>,
},
Negative {
weight: i16,
scale: u16,
digits: Vec<i16>,
},
NaN,
}
Available on crate feature
postgres_backend
only.Expand description
Represents a NUMERIC value, closely mirroring the PG wire protocol representation
Variants§
Trait Implementations§
source§impl<'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
source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
source§impl 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
source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
source§impl<'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
source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
source§impl AsExpression<Numeric> for PgNumeric
impl AsExpression<Numeric> for PgNumeric
§type Expression = Bound<Numeric, PgNumeric>
type Expression = Bound<Numeric, PgNumeric>
The expression being returned
source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
source§impl<'a> From<&'a BigDecimal> for PgNumeric
Available on crate feature bigdecimal
only.
impl<'a> From<&'a BigDecimal> for PgNumeric
Available on crate feature
bigdecimal
only.source§fn from(decimal: &'a BigDecimal) -> Self
fn from(decimal: &'a BigDecimal) -> Self
Converts to this type from the input type.
source§impl From<BigDecimal> for PgNumeric
Available on crate feature bigdecimal
only.
impl From<BigDecimal> for PgNumeric
Available on crate feature
bigdecimal
only.source§fn from(bigdecimal: BigDecimal) -> Self
fn from(bigdecimal: BigDecimal) -> Self
Converts to this type from the input type.
source§impl PartialEq for PgNumeric
impl PartialEq for PgNumeric
source§impl<'a> TryFrom<&'a PgNumeric> for BigDecimal
Available on crate feature bigdecimal
only.
impl<'a> TryFrom<&'a PgNumeric> for BigDecimal
Available on crate feature
bigdecimal
only.source§impl TryFrom<PgNumeric> for BigDecimal
Available on crate feature bigdecimal
only.
impl TryFrom<PgNumeric> for BigDecimal
Available on crate feature
bigdecimal
only.impl Eq for PgNumeric
impl StructuralPartialEq for PgNumeric
Auto Trait Implementations§
impl Freeze for PgNumeric
impl RefUnwindSafe for PgNumeric
impl Send for PgNumeric
impl Sync for PgNumeric
impl Unpin for PgNumeric
impl UnwindSafe for PgNumeric
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T, ST, DB> FromSqlRow<ST, DB> for Twhere
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 Twhere
T: Queryable<ST, DB>,
ST: SqlTypeOrSelectable,
DB: Backend,
<T as Queryable<ST, DB>>::Row: FromStaticSqlRow<ST, DB>,
source§impl<T, ST, DB> FromStaticSqlRow<ST, DB> for T
impl<T, ST, DB> FromStaticSqlRow<ST, DB> for T
source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§impl<T, ST, DB> StaticallySizedRow<ST, DB> for T
impl<T, ST, DB> StaticallySizedRow<ST, DB> for T
source§const FIELD_COUNT: usize = const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE;
const FIELD_COUNT: usize = const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE;
The number of fields that this type will consume.