Struct dec::Decimal32[][src]

pub struct Decimal32 { /* fields omitted */ }

A 32-bit decimal floating-point number.

Implementations

impl Decimal32[src]

pub fn zero() -> Decimal32[src]

Constructs a 128-bit decimal floating-point number representing the number 0.

pub fn from_le_bytes(mut bytes: [u8; 4]) -> Decimal32[src]

Creates a number from its representation as a little-endian byte array.

pub fn from_be_bytes(mut bytes: [u8; 4]) -> Decimal32[src]

Creates a number from its representation as a big-endian byte array.

pub fn from_ne_bytes(bytes: [u8; 4]) -> Decimal32[src]

Creates a number from its representation as a byte array in the native endianness of the target platform.

pub fn to_le_bytes(&self) -> [u8; 4][src]

Returns the memory representation of the number as a byte array in little-endian order.

pub fn to_be_bytes(&self) -> [u8; 4][src]

Returns the memory representation of the number as a byte array in big-endian order.

pub fn to_ne_bytes(&self) -> [u8; 4][src]

Returns the memory representation of the number as a byte array in the native endianness of the target platform.

pub fn exponent(&self) -> i32[src]

Computes the exponent of the number.

Trait Implementations

impl Clone for Decimal32[src]

impl Copy for Decimal32[src]

impl Debug for Decimal32[src]

impl Default for Decimal32[src]

impl Display for Decimal32[src]

impl<const N: usize> From<Decimal32> for Decimal<N>[src]

This is supported on crate feature arbitrary-precision only.

impl From<Decimal32> for Decimal128[src]

impl From<Decimal32> for Decimal64[src]

impl FromStr for Decimal32[src]

type Err = ParseDecimalError

The associated error which can be returned from parsing.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.