pub enum PgNumeric {
Positive {
weight: i16,
scale: u16,
digits: Vec<i16>,
},
Negative {
weight: i16,
scale: u16,
digits: Vec<i16>,
},
NaN,
}
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
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
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
Source§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
Source§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<__ST, __DB> FromSqlRow<__ST, __DB> for PgNumeric
impl<__ST, __DB> FromSqlRow<__ST, __DB> for PgNumeric
Source§const FIELDS_NEEDED: usize = 1usize
const FIELDS_NEEDED: usize = 1usize
The number of fields that this type will consume. Must be equal to
the number of times you would call
row.take()
in build_from_row
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