[−][src]Struct clickhouse_rs::types::Decimal
Provides arbitrary-precision floating point decimal.
Methods
impl Decimal[src]
pub fn of<B: Base>(source: B, scale: u8) -> Decimal[src]
Method of creating a Decimal.
pub fn internal<I: InternalResult>(&self) -> I[src]
Get the internal representation of decimal as i32 or i64.
example:
.and_then(move |c| c.query("SELECT toDecimal32(2, 4) AS x").fetch_all())
.and_then(move |(_, block)| {
let x: Decimal = block.get(0, "x")?;
let actual: i32 = x.internal();
assert_eq!(20000, actual);
})pub fn scale(&self) -> usize[src]
Determines how many decimal digits fraction can have.
Trait Implementations
impl<'a> FromSql<'a> for Decimal[src]
impl Clone for Decimal[src]
fn clone(&self) -> Decimal[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Default for Decimal[src]
impl From<Decimal> for f32[src]
impl From<Decimal> for f64[src]
impl PartialEq<Decimal> for Decimal[src]
fn eq(&self, other: &Self) -> bool[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
This method tests for !=.
impl Display for Decimal[src]
impl Debug for Decimal[src]
Auto Trait Implementations
impl Sync for Decimal
impl Send for Decimal
impl Unpin for Decimal
impl RefUnwindSafe for Decimal
impl UnwindSafe for Decimal
Blanket Implementations
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> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
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<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,