Skip to main content

Numeric

Type Alias Numeric 

Source
pub type Numeric = BigDecimal;
Available on crate feature numeric only.
Expand description

Rust type for numeric.

Aliased Type§

pub struct Numeric { /* private fields */ }

Trait Implementations§

Source§

impl FromSql for Numeric

Source§

fn from_text(ty: &Type, raw: Option<&str>) -> Result<Self>

Create a new struct from the text representation. Read more
Source§

fn from_binary(ty: &Type, raw: Option<&[u8]>) -> Result<Self>

Create a new struct from the binary representation. Read more
Source§

fn from_sql(ty: &Type, format: Format, raw: Option<&[u8]>) -> Result<Self>

Create a new struct from SQL value.
Source§

fn error<T: Debug>(pg_type: &Type, raw: T) -> Error

Source§

impl Simple for Numeric

Source§

impl ToSql for Numeric

Source§

fn ty(&self) -> Type

The corresponding SQL type
Source§

fn to_text(&self) -> Result<Option<String>>

Convert the value to text format Read more
Source§

fn to_binary(&self) -> Result<Option<Vec<u8>>>

Convert the value to binary format Read more
Source§

fn error(&self, message: &str) -> Error