[−][src]Struct tiberius::numeric::Numeric
Represent a sql Decimal / Numeric type. It is stored in a i128 and has a maximum precision of 38 decimals.
A recommended way of dealing with numeric values is by enabling the
rust_decimal
feature and using its Decimal
type instead.
Implementations
impl Numeric
[src]
pub fn new_with_scale(value: i128, scale: u8) -> Self
[src]
pub fn dec_part(self) -> i128
[src]
Extract the decimal part.
pub fn int_part(self) -> i128
[src]
Extract the integer part.
pub fn scale(self) -> u8
[src]
The scale (where is the decimal point) of the value.
pub fn value(self) -> i128
[src]
The internal integer value
pub fn precision(self) -> u8
[src]
The precision of the Number
as a number of digits.
Trait Implementations
impl Clone for Numeric
[src]
impl Copy for Numeric
[src]
impl Debug for Numeric
[src]
impl Display for Numeric
[src]
impl Eq for Numeric
[src]
impl From<Numeric> for f64
[src]
impl From<Numeric> for i128
[src]
impl From<Numeric> for u128
[src]
impl<'a> FromSql<'a> for Numeric
[src]
fn from_sql(data: &'a ColumnData<'static>) -> Result<Option<Self>>
[src]
impl FromSqlOwned for Numeric
[src]
fn from_sql_owned(data: ColumnData<'static>) -> Result<Option<Self>>
[src]
impl PartialEq<Numeric> for Numeric
[src]
impl ToSql for Numeric
[src]
fn to_sql(&self) -> ColumnData
[src]
Auto Trait Implementations
impl RefUnwindSafe for Numeric
impl Send for Numeric
impl Sync for Numeric
impl Unpin for Numeric
impl UnwindSafe for Numeric
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,