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
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>, Self>
type Expression = Bound<Nullable<Numeric>, Self>
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>, Self>
type Expression = Bound<Nullable<Numeric>, Self>
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, Self>
type Expression = Bound<Numeric, Self>
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, Self>
type Expression = Bound<Numeric, Self>
The expression being returned
sourcefn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
sourceimpl<__ST, __DB> FromSqlRow<__ST, __DB> for PgNumeric where
__DB: Backend,
Self: FromSql<__ST, __DB>,
impl<__ST, __DB> FromSqlRow<__ST, __DB> for PgNumeric where
__DB: Backend,
Self: FromSql<__ST, __DB>,
sourcefn build_from_row<R: Row<__DB>>(row: &mut R) -> Result<Self>
fn build_from_row<R: Row<__DB>>(row: &mut R) -> Result<Self>
See the trait documentation.
sourceconst FIELDS_NEEDED: usize
const FIELDS_NEEDED: usize
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
Read more
sourceimpl<__ST, __DB> Queryable<__ST, __DB> for PgNumeric where
__DB: Backend,
Self: FromSql<__ST, __DB>,
impl<__ST, __DB> Queryable<__ST, __DB> for PgNumeric where
__DB: Backend,
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>,
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 · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> IntoSql for T
impl<T> IntoSql for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more