Enum diesel::pg::data_types::PgNumeric [−][src]
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
PositiveA 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 |
NegativeA 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 |
NaNNot a number
Trait Implementations
impl<__ST, __DB> FromSqlRow<__ST, __DB> for PgNumeric where
__DB: Backend,
Self: FromSql<__ST, __DB>, [src]
impl<__ST, __DB> FromSqlRow<__ST, __DB> for PgNumeric where
__DB: Backend,
Self: FromSql<__ST, __DB>, fn build_from_row<R: Row<__DB>>(row: &mut R) -> Result<Self>[src]
fn build_from_row<R: Row<__DB>>(row: &mut R) -> Result<Self>See the trait documentation.
const FIELDS_NEEDED: usize
FIELDS_NEEDED: usize = 1
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
impl<__ST, __DB> Queryable<__ST, __DB> for PgNumeric where
__DB: Backend,
Self: FromSql<__ST, __DB>, [src]
impl<__ST, __DB> Queryable<__ST, __DB> for PgNumeric where
__DB: Backend,
Self: FromSql<__ST, __DB>, type Row = Self
The Rust type you'd like to map from. Read more
fn build(row: Self::Row) -> Self[src]
fn build(row: Self::Row) -> SelfConstruct an instance of this type
impl<'expr> AsExpression<Numeric> for &'expr PgNumeric[src]
impl<'expr> AsExpression<Numeric> for &'expr PgNumerictype Expression = Bound<Numeric, Self>
The expression being returned
fn as_expression(self) -> Self::Expression[src]
fn as_expression(self) -> Self::ExpressionPerform the conversion
impl<'expr> AsExpression<Nullable<Numeric>> for &'expr PgNumeric[src]
impl<'expr> AsExpression<Nullable<Numeric>> for &'expr PgNumerictype Expression = Bound<Nullable<Numeric>, Self>
The expression being returned
fn as_expression(self) -> Self::Expression[src]
fn as_expression(self) -> Self::ExpressionPerform the conversion
impl<__DB> ToSql<Nullable<Numeric>, __DB> for PgNumeric where
__DB: Backend,
Self: ToSql<Numeric, __DB>, [src]
impl<__DB> ToSql<Nullable<Numeric>, __DB> for PgNumeric where
__DB: Backend,
Self: ToSql<Numeric, __DB>, impl AsExpression<Numeric> for PgNumeric[src]
impl AsExpression<Numeric> for PgNumerictype Expression = Bound<Numeric, Self>
The expression being returned
fn as_expression(self) -> Self::Expression[src]
fn as_expression(self) -> Self::ExpressionPerform the conversion
impl AsExpression<Nullable<Numeric>> for PgNumeric[src]
impl AsExpression<Nullable<Numeric>> for PgNumerictype Expression = Bound<Nullable<Numeric>, Self>
The expression being returned
fn as_expression(self) -> Self::Expression[src]
fn as_expression(self) -> Self::ExpressionPerform the conversion
impl Debug for PgNumeric[src]
impl Debug for PgNumericfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for PgNumeric[src]
impl Clone for PgNumericfn clone(&self) -> PgNumeric[src]
fn clone(&self) -> PgNumericReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl PartialEq for PgNumeric[src]
impl PartialEq for PgNumericfn eq(&self, other: &PgNumeric) -> bool[src]
fn eq(&self, other: &PgNumeric) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &PgNumeric) -> bool[src]
fn ne(&self, other: &PgNumeric) -> boolThis method tests for !=.
impl Eq for PgNumeric[src]
impl Eq for PgNumericimpl FromSql<Numeric, Pg> for PgNumeric[src]
impl FromSql<Numeric, Pg> for PgNumericimpl ToSql<Numeric, Pg> for PgNumeric[src]
impl ToSql<Numeric, Pg> for PgNumeric