Struct dec::Decimal32 [−][src]
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]
arbitrary-precision
only.impl From<Decimal32> for Decimal128
[src]
fn from(d32: Decimal32) -> 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.
fn from_str(s: &str) -> Result<Decimal32, ParseDecimalError>
[src]
Auto Trait Implementations
impl RefUnwindSafe for Decimal32
[src]
impl Send for Decimal32
[src]
impl Sync for Decimal32
[src]
impl Unpin for Decimal32
[src]
impl UnwindSafe for Decimal32
[src]
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,
pub 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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,