Skip to main content

AncDec128

Struct AncDec128 

Source
pub struct AncDec128 { /* private fields */ }
Expand description

128-bit fixed-point decimal (u128 int/frac, 38-digit precision, 40 bytes).

Stores integer and fractional parts as separate u128 values with an explicit scale (0-38).

§Example

use ancdec::AncDec128;
let a: AncDec128 = "123.456".parse().unwrap();
assert_eq!(a.int(), 123);

Implementations§

Source§

impl AncDec128

Source

pub fn add(&self, other: &Self) -> Self

Adds two decimals, panics on integer overflow.

Source

pub fn sub(&self, other: &Self) -> Self

Subtracts other from self, panics on integer overflow.

Source

pub fn mul(&self, other: &Self) -> Self

Multiplies two decimals, panics on overflow. Uses u256/u512 wide arithmetic when needed.

Source

pub fn div(&self, other: &Self) -> Self

Divides self by other, panics on division by zero. Uses u256/u512 wide arithmetic when needed.

Source

pub fn checked_add(&self, other: &Self) -> Option<Self>

Checked addition. Returns None if the integer part overflows u128.

Source

pub fn checked_sub(&self, other: &Self) -> Option<Self>

Checked subtraction. Returns None if the integer part overflows u128.

In practice, subtraction in the current design uses magnitude comparison and cannot overflow, so this always returns Some.

Source

pub fn checked_mul(&self, other: &Self) -> Option<Self>

Checked multiplication. Returns None if the result overflows u128 integer range.

Source

pub fn rem(&self, other: &Self) -> Self

Computes the remainder (self % other), panics on division by zero.

Source§

impl AncDec128

Source

pub fn abs(&self) -> Self

Returns the absolute value.

Source

pub fn signum(&self) -> Self

Returns the sign: 1 for positive, -1 for negative, 0 for zero.

Source

pub fn is_positive(&self) -> bool

Returns true if the value is strictly positive.

Source

pub fn is_negative(&self) -> bool

Returns true if the value is strictly negative.

Source

pub fn is_zero(&self) -> bool

Returns true if the value is zero.

Source

pub fn min(self, other: Self) -> Self

Returns the smaller of self and other.

Source

pub fn max(self, other: Self) -> Self

Returns the larger of self and other.

Source

pub fn clamp(self, min: Self, max: Self) -> Self

Clamps the value to the range [min, max].

Source

pub fn sqrt(&self) -> Self

Returns the square root with 37 fractional digits of precision. Panics if negative.

Source

pub fn pow(&self, n: i32) -> Self

Raises self to the power n using binary exponentiation. Supports negative exponents.

Source§

impl AncDec128

Source

pub fn to_f64(&self) -> f64

Converts to f64 (may lose precision for large values).

Source

pub fn to_i64(&self) -> i64

Converts to i64, truncating the fractional part. Panics on overflow.

Source

pub fn to_i128(&self) -> i128

Converts to i128, truncating the fractional part. Panics on overflow.

Source§

impl AncDec128

Source

pub fn round(&self, decimal_places: u8, mode: RoundMode) -> Self

Rounds to the given number of decimal places using the specified mode.

Source

pub fn floor(&self) -> Self

Returns the largest integer less than or equal to self.

Source

pub fn ceil(&self) -> Self

Returns the smallest integer greater than or equal to self.

Source

pub fn trunc(&self) -> Self

Returns the integer part, truncating toward zero.

Source

pub fn fract(&self) -> Self

Returns the fractional part only.

Source§

impl AncDec128

Source

pub const ZERO: AncDec128

The value 0.

Source

pub const ONE: AncDec128

The value 1.

Source

pub const TWO: AncDec128

The value 2.

Source

pub const TEN: AncDec128

The value 10.

Source

pub const MAX: AncDec128

The maximum representable value.

Source§

impl AncDec128

Source

pub fn new(int: u128, frac: u128, scale: u8, neg: bool) -> Self

Creates a new AncDec128. Panics if scale > 38 or frac >= 10^scale.

Source

pub fn int(&self) -> u128

Returns the integer part.

Source

pub fn frac(&self) -> u128

Returns the fractional part as a raw value (0 to 10^scale - 1).

Source

pub fn scale(&self) -> u8

Returns the number of fractional digits (0-38).

Source

pub fn is_neg(&self) -> bool

Returns true if the value is negative.

Source§

impl AncDec128

Source

pub fn parse<T: Display>(value: T) -> Result<Self, ParseError>

Parses any Display type into an AncDec128 using a stack buffer (no heap allocation).

Trait Implementations§

Source§

impl<'b> Add<&'b AncDec128> for &AncDec128

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'b AncDec128) -> AncDec128

Performs the + operation. Read more
Source§

impl<'a> Add<&'a AncDec128> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'a AncDec128) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<AncDec> for AncDec128

Available on crate features dec64 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AncDec) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<AncDec128> for &AncDec128

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AncDec128) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<AncDec128> for AncDec

Available on crate features dec64 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AncDec128) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<AncDec128> for AncDec32

Available on crate features dec32 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AncDec128) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<AncDec128> for AncDec8

Available on crate features dec8 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AncDec128) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<AncDec128> for i128

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AncDec128) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<AncDec128> for i16

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AncDec128) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<AncDec128> for i32

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AncDec128) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<AncDec128> for i64

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AncDec128) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<AncDec128> for i8

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AncDec128) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<AncDec128> for isize

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AncDec128) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<AncDec128> for u128

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AncDec128) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<AncDec128> for u16

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AncDec128) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<AncDec128> for u32

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AncDec128) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<AncDec128> for u64

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AncDec128) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<AncDec128> for u8

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AncDec128) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<AncDec128> for usize

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AncDec128) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<AncDec32> for AncDec128

Available on crate features dec32 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AncDec32) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<AncDec8> for AncDec128

Available on crate features dec8 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AncDec8) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<i128> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: i128) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<i16> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: i16) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<i32> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: i32) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<i64> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: i64) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<i8> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: i8) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<isize> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: isize) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<u128> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u128) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<u16> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u16) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<u32> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u32) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<u64> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u64) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<u8> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u8) -> AncDec128

Performs the + operation. Read more
Source§

impl Add<usize> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: usize) -> AncDec128

Performs the + operation. Read more
Source§

impl Add for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self

Performs the + operation. Read more
Source§

impl AddAssign for AncDec128

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl Clone for AncDec128

Source§

fn clone(&self) -> AncDec128

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AncDec128

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AncDec128

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for AncDec128

Display trait: enables format!, println!, to_string()

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'b> Div<&'b AncDec128> for &AncDec128

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &'b AncDec128) -> AncDec128

Performs the / operation. Read more
Source§

impl<'a> Div<&'a AncDec128> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &'a AncDec128) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<AncDec> for AncDec128

Available on crate features dec64 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: AncDec) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<AncDec128> for &AncDec128

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: AncDec128) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<AncDec128> for AncDec

Available on crate features dec64 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: AncDec128) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<AncDec128> for AncDec32

Available on crate features dec32 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: AncDec128) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<AncDec128> for AncDec8

Available on crate features dec8 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: AncDec128) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<AncDec128> for i128

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: AncDec128) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<AncDec128> for i16

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: AncDec128) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<AncDec128> for i32

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: AncDec128) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<AncDec128> for i64

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: AncDec128) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<AncDec128> for i8

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: AncDec128) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<AncDec128> for isize

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: AncDec128) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<AncDec128> for u128

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: AncDec128) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<AncDec128> for u16

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: AncDec128) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<AncDec128> for u32

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: AncDec128) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<AncDec128> for u64

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: AncDec128) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<AncDec128> for u8

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: AncDec128) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<AncDec128> for usize

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: AncDec128) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<AncDec32> for AncDec128

Available on crate features dec32 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: AncDec32) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<AncDec8> for AncDec128

Available on crate features dec8 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: AncDec8) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<i128> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: i128) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<i16> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: i16) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<i32> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: i32) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<i64> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: i64) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<i8> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: i8) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<isize> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: isize) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<u128> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: u128) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<u16> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: u16) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<u32> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: u32) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<u64> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: u64) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<u8> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: u8) -> AncDec128

Performs the / operation. Read more
Source§

impl Div<usize> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: usize) -> AncDec128

Performs the / operation. Read more
Source§

impl Div for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Self) -> Self

Performs the / operation. Read more
Source§

impl DivAssign for AncDec128

Source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
Source§

impl From<AncDec> for AncDec128

Available on crate feature dec64 only.

Lossless widening from AncDec (u64) to AncDec128 (u128)

Source§

fn from(a: AncDec) -> Self

Converts to this type from the input type.
Source§

impl From<AncDec32> for AncDec128

Available on crate feature dec32 only.

Lossless widening from AncDec32 (u32) to AncDec128 (u128)

Source§

fn from(a: AncDec32) -> Self

Converts to this type from the input type.
Source§

impl From<AncDec8> for AncDec128

Available on crate feature dec8 only.

Lossless widening from AncDec8 (u8) to AncDec128 (u128)

Source§

fn from(a: AncDec8) -> Self

Converts to this type from the input type.
Source§

impl From<i128> for AncDec128

Source§

fn from(n: i128) -> Self

Converts to this type from the input type.
Source§

impl From<i16> for AncDec128

Source§

fn from(n: i16) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for AncDec128

Source§

fn from(n: i32) -> Self

Converts to this type from the input type.
Source§

impl From<i64> for AncDec128

Source§

fn from(n: i64) -> Self

Converts to this type from the input type.
Source§

impl From<i8> for AncDec128

Source§

fn from(n: i8) -> Self

Converts to this type from the input type.
Source§

impl From<isize> for AncDec128

Source§

fn from(n: isize) -> Self

Converts to this type from the input type.
Source§

impl From<u128> for AncDec128

Source§

fn from(n: u128) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for AncDec128

Source§

fn from(n: u16) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for AncDec128

Source§

fn from(n: u32) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for AncDec128

Source§

fn from(n: u64) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for AncDec128

Source§

fn from(n: u8) -> Self

Converts to this type from the input type.
Source§

impl From<usize> for AncDec128

Source§

fn from(n: usize) -> Self

Converts to this type from the input type.
Source§

impl FromStr for AncDec128

FromStr trait: enables "123.45".parse::<AncDec128>()

Source§

type Err = ParseError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for AncDec128

Normalizes trailing zeros so 1.0 == 1.00 have same hash Uses u256 combined value via mul_wide

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<'b> Mul<&'b AncDec128> for &AncDec128

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'b AncDec128) -> AncDec128

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a AncDec128> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a AncDec128) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<AncDec> for AncDec128

Available on crate features dec64 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AncDec) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<AncDec128> for &AncDec128

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AncDec128) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<AncDec128> for AncDec

Available on crate features dec64 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AncDec128) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<AncDec128> for AncDec32

Available on crate features dec32 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AncDec128) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<AncDec128> for AncDec8

Available on crate features dec8 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AncDec128) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<AncDec128> for i128

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AncDec128) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<AncDec128> for i16

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AncDec128) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<AncDec128> for i32

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AncDec128) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<AncDec128> for i64

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AncDec128) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<AncDec128> for i8

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AncDec128) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<AncDec128> for isize

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AncDec128) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<AncDec128> for u128

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AncDec128) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<AncDec128> for u16

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AncDec128) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<AncDec128> for u32

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AncDec128) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<AncDec128> for u64

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AncDec128) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<AncDec128> for u8

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AncDec128) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<AncDec128> for usize

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AncDec128) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<AncDec32> for AncDec128

Available on crate features dec32 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AncDec32) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<AncDec8> for AncDec128

Available on crate features dec8 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AncDec8) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<i128> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: i128) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<i16> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: i16) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<i32> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: i32) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<i64> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: i64) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<i8> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: i8) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<isize> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: isize) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<u128> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: u128) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<u16> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: u16) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<u32> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: u32) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<u64> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: u64) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<u8> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: u8) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul<usize> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: usize) -> AncDec128

Performs the * operation. Read more
Source§

impl Mul for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Self

Performs the * operation. Read more
Source§

impl MulAssign for AncDec128

Source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
Source§

impl Neg for &AncDec128

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn neg(self) -> AncDec128

Performs the unary - operation. Read more
Source§

impl Neg for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self

Performs the unary - operation. Read more
Source§

impl Ord for AncDec128

Ord trait

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for AncDec128

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for AncDec128

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a> Product<&'a AncDec128> for AncDec128

Source§

fn product<I: Iterator<Item = &'a Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl Product for AncDec128

Source§

fn product<I: Iterator<Item = Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl<'b> Rem<&'b AncDec128> for &AncDec128

Source§

type Output = AncDec128

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &'b AncDec128) -> AncDec128

Performs the % operation. Read more
Source§

impl<'a> Rem<&'a AncDec128> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &'a AncDec128) -> AncDec128

Performs the % operation. Read more
Source§

impl Rem<AncDec> for AncDec128

Available on crate features dec64 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: AncDec) -> AncDec128

Performs the % operation. Read more
Source§

impl Rem<AncDec128> for &AncDec128

Source§

type Output = AncDec128

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: AncDec128) -> AncDec128

Performs the % operation. Read more
Source§

impl Rem<AncDec128> for AncDec

Available on crate features dec64 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: AncDec128) -> AncDec128

Performs the % operation. Read more
Source§

impl Rem<AncDec128> for AncDec32

Available on crate features dec32 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: AncDec128) -> AncDec128

Performs the % operation. Read more
Source§

impl Rem<AncDec128> for AncDec8

Available on crate features dec8 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: AncDec128) -> AncDec128

Performs the % operation. Read more
Source§

impl Rem<AncDec32> for AncDec128

Available on crate features dec32 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: AncDec32) -> AncDec128

Performs the % operation. Read more
Source§

impl Rem<AncDec8> for AncDec128

Available on crate features dec8 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: AncDec8) -> AncDec128

Performs the % operation. Read more
Source§

impl Rem for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Self) -> Self

Performs the % operation. Read more
Source§

impl RemAssign for AncDec128

Source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
Source§

impl<'b> Sub<&'b AncDec128> for &AncDec128

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &'b AncDec128) -> AncDec128

Performs the - operation. Read more
Source§

impl<'a> Sub<&'a AncDec128> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &'a AncDec128) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<AncDec> for AncDec128

Available on crate features dec64 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AncDec) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<AncDec128> for &AncDec128

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AncDec128) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<AncDec128> for AncDec

Available on crate features dec64 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AncDec128) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<AncDec128> for AncDec32

Available on crate features dec32 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AncDec128) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<AncDec128> for AncDec8

Available on crate features dec8 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AncDec128) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<AncDec128> for i128

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AncDec128) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<AncDec128> for i16

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AncDec128) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<AncDec128> for i32

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AncDec128) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<AncDec128> for i64

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AncDec128) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<AncDec128> for i8

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AncDec128) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<AncDec128> for isize

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AncDec128) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<AncDec128> for u128

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AncDec128) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<AncDec128> for u16

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AncDec128) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<AncDec128> for u32

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AncDec128) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<AncDec128> for u64

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AncDec128) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<AncDec128> for u8

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AncDec128) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<AncDec128> for usize

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AncDec128) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<AncDec32> for AncDec128

Available on crate features dec32 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AncDec32) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<AncDec8> for AncDec128

Available on crate features dec8 and dec128 only.
Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AncDec8) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<i128> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: i128) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<i16> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: i16) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<i32> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: i32) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<i64> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: i64) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<i8> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: i8) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<isize> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: isize) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<u128> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: u128) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<u16> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: u16) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<u32> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: u32) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<u64> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: u64) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<u8> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: u8) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub<usize> for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: usize) -> AncDec128

Performs the - operation. Read more
Source§

impl Sub for AncDec128

Source§

type Output = AncDec128

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self

Performs the - operation. Read more
Source§

impl SubAssign for AncDec128

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl<'a> Sum<&'a AncDec128> for AncDec128

Source§

fn sum<I: Iterator<Item = &'a Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl Sum for AncDec128

Source§

fn sum<I: Iterator<Item = Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl TryFrom<&str> for AncDec128

Source§

type Error = ParseError

The type returned in the event of a conversion error.
Source§

fn try_from(s: &str) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<f32> for AncDec128

Source§

type Error = ParseError

The type returned in the event of a conversion error.
Source§

fn try_from(n: f32) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<f64> for AncDec128

Source§

type Error = ParseError

The type returned in the event of a conversion error.
Source§

fn try_from(n: f64) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Copy for AncDec128

Source§

impl Eq for AncDec128

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.