Skip to main content

AncDec

Struct AncDec 

Source
#[repr(C)]
pub struct AncDec { pub int: u64, pub frac: u64, pub scale: u8, pub neg: bool, }
Expand description

64-bit fixed-point decimal (u64 int/frac, 19-digit precision, 24 bytes).

Stores integer and fractional parts as separate u64 values with an explicit scale (0-19). Fields are pub for backward compatibility and FFI use.

§Example

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

Fields§

§int: u64

Integer part (0 to u64::MAX).

§frac: u64

Fractional part (0 to 10^scale - 1).

§scale: u8

Number of fractional digits (0-19).

§neg: bool

Sign flag: true if negative.

Implementations§

Source§

impl AncDec

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 wide arithmetic when needed.

Source

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

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

Source

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

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

Source

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

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

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 u64 integer range.

Source

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

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

Source§

impl AncDec

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 18 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 AncDec

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.

Source§

impl AncDec

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 AncDec

Source

pub const ZERO: AncDec

The value 0.

Source

pub const ONE: AncDec

The value 1.

Source

pub const TWO: AncDec

The value 2.

Source

pub const TEN: AncDec

The value 10.

Source

pub const MAX: AncDec

The maximum representable value.

Source§

impl AncDec

Source

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

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

Trait Implementations§

Source§

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

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<AncDec> for &AncDec

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

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<AncDec> for AncDec32

Available on crate features dec32 and dec64 only.
Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<AncDec> for AncDec8

Available on crate features dec8 and dec64 only.
Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<AncDec> for i128

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<AncDec> for i16

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<AncDec> for i32

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<AncDec> for i64

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<AncDec> for i8

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<AncDec> for isize

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<AncDec> for u128

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<AncDec> for u16

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<AncDec> for u32

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<AncDec> for u64

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<AncDec> for u8

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<AncDec> for usize

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

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<AncDec32> for AncDec

Available on crate features dec32 and dec64 only.
Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<AncDec8> for AncDec

Available on crate features dec8 and dec64 only.
Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<i128> for AncDec

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<i16> for AncDec

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<i32> for AncDec

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<i64> for AncDec

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<i8> for AncDec

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<isize> for AncDec

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<u128> for AncDec

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<u16> for AncDec

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<u32> for AncDec

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<u64> for AncDec

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<u8> for AncDec

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<usize> for AncDec

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add for AncDec

Add trait: enables a + b

Source§

type Output = AncDec

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl AddAssign for AncDec

AddAssign: enables a += b

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl Clone for AncDec

Source§

fn clone(&self) -> AncDec

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 AncDec

Source§

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

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

impl Default for AncDec

Default trait: AncDec::default() returns ZERO

Source§

fn default() -> Self

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

impl Display for AncDec

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 AncDec> for &AncDec

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

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

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<AncDec> for &AncDec

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

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<AncDec> for AncDec32

Available on crate features dec32 and dec64 only.
Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<AncDec> for AncDec8

Available on crate features dec8 and dec64 only.
Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<AncDec> for i128

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<AncDec> for i16

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<AncDec> for i32

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<AncDec> for i64

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<AncDec> for i8

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<AncDec> for isize

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<AncDec> for u128

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<AncDec> for u16

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<AncDec> for u32

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<AncDec> for u64

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<AncDec> for u8

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<AncDec> for usize

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

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<AncDec32> for AncDec

Available on crate features dec32 and dec64 only.
Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<AncDec8> for AncDec

Available on crate features dec8 and dec64 only.
Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<i128> for AncDec

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<i16> for AncDec

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<i32> for AncDec

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<i64> for AncDec

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<i8> for AncDec

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<isize> for AncDec

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<u128> for AncDec

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<u16> for AncDec

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<u32> for AncDec

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<u64> for AncDec

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<u8> for AncDec

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<usize> for AncDec

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div for AncDec

Div trait: enables a / b

Source§

type Output = AncDec

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl DivAssign for AncDec

DivAssign: enables a /= b

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 AncDec

Available on crate feature dec32 only.

Lossless widening from AncDec32 (u32) to AncDec (u64)

Source§

fn from(a: AncDec32) -> Self

Converts to this type from the input type.
Source§

impl From<AncDec8> for AncDec

Available on crate feature dec8 only.

Lossless widening from AncDec8 (u8) to AncDec (u64)

Source§

fn from(a: AncDec8) -> Self

Converts to this type from the input type.
Source§

impl From<i128> for AncDec

Source§

fn from(n: i128) -> Self

Converts to this type from the input type.
Source§

impl From<i16> for AncDec

Source§

fn from(n: i16) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for AncDec

Source§

fn from(n: i32) -> Self

Converts to this type from the input type.
Source§

impl From<i64> for AncDec

Source§

fn from(n: i64) -> Self

Converts to this type from the input type.
Source§

impl From<i8> for AncDec

Source§

fn from(n: i8) -> Self

Converts to this type from the input type.
Source§

impl From<isize> for AncDec

Source§

fn from(n: isize) -> Self

Converts to this type from the input type.
Source§

impl From<u128> for AncDec

Source§

fn from(n: u128) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for AncDec

Source§

fn from(n: u16) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for AncDec

Source§

fn from(n: u32) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for AncDec

Source§

fn from(n: u64) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for AncDec

Source§

fn from(n: u8) -> Self

Converts to this type from the input type.
Source§

impl From<usize> for AncDec

Source§

fn from(n: usize) -> Self

Converts to this type from the input type.
Source§

impl FromStr for AncDec

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

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 AncDec

Hash trait: enables use in HashMap/HashSet Normalizes trailing zeros so 1.0 == 1.00 have same hash

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 AncDec> for &AncDec

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

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

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<AncDec> for &AncDec

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

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<AncDec> for AncDec32

Available on crate features dec32 and dec64 only.
Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<AncDec> for AncDec8

Available on crate features dec8 and dec64 only.
Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<AncDec> for i128

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<AncDec> for i16

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<AncDec> for i32

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<AncDec> for i64

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<AncDec> for i8

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<AncDec> for isize

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<AncDec> for u128

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<AncDec> for u16

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<AncDec> for u32

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<AncDec> for u64

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<AncDec> for u8

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<AncDec> for usize

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

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<AncDec32> for AncDec

Available on crate features dec32 and dec64 only.
Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<AncDec8> for AncDec

Available on crate features dec8 and dec64 only.
Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<i128> for AncDec

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<i16> for AncDec

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<i32> for AncDec

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<i64> for AncDec

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<i8> for AncDec

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<isize> for AncDec

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<u128> for AncDec

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<u16> for AncDec

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<u32> for AncDec

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<u64> for AncDec

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<u8> for AncDec

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<usize> for AncDec

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul for AncDec

Mul trait: enables a * b

Source§

type Output = AncDec

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl MulAssign for AncDec

MulAssign: enables a *= b

Source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
Source§

impl Neg for &AncDec

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

fn neg(self) -> AncDec

Performs the unary - operation. Read more
Source§

impl Neg for AncDec

Neg trait: enables -a

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self

Performs the unary - operation. Read more
Source§

impl Ord for AncDec

Ord trait: enables <, >, sort(), min(), max()

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 AncDec

PartialEq trait: enables ==, !=

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 AncDec

PartialOrd trait: enables <, > comparisons

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 AncDec> for AncDec

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 AncDec

Product trait: enables iter.product::<AncDec>()

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 AncDec> for &AncDec

Source§

type Output = AncDec

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

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

Source§

type Output = AncDec

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

impl Rem<AncDec> for &AncDec

Source§

type Output = AncDec

The resulting type after applying the % operator.
Source§

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

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<AncDec> for AncDec32

Available on crate features dec32 and dec64 only.
Source§

type Output = AncDec

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

impl Rem<AncDec> for AncDec8

Available on crate features dec8 and dec64 only.
Source§

type Output = AncDec

The resulting type after applying the % operator.
Source§

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

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<AncDec32> for AncDec

Available on crate features dec32 and dec64 only.
Source§

type Output = AncDec

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

impl Rem<AncDec8> for AncDec

Available on crate features dec8 and dec64 only.
Source§

type Output = AncDec

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

impl Rem for AncDec

Rem trait: enables a % b

Source§

type Output = AncDec

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

impl RemAssign for AncDec

RemAssign: enables a %= b

Source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
Source§

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

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<AncDec> for &AncDec

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

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<AncDec> for AncDec32

Available on crate features dec32 and dec64 only.
Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<AncDec> for AncDec8

Available on crate features dec8 and dec64 only.
Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<AncDec> for i128

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<AncDec> for i16

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<AncDec> for i32

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<AncDec> for i64

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<AncDec> for i8

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<AncDec> for isize

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<AncDec> for u128

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<AncDec> for u16

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<AncDec> for u32

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<AncDec> for u64

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<AncDec> for u8

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<AncDec> for usize

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

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<AncDec32> for AncDec

Available on crate features dec32 and dec64 only.
Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<AncDec8> for AncDec

Available on crate features dec8 and dec64 only.
Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<i128> for AncDec

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<i16> for AncDec

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<i32> for AncDec

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<i64> for AncDec

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<i8> for AncDec

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<isize> for AncDec

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<u128> for AncDec

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<u16> for AncDec

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<u32> for AncDec

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<u64> for AncDec

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<u8> for AncDec

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<usize> for AncDec

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub for AncDec

Sub trait: enables a - b

Source§

type Output = AncDec

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl SubAssign for AncDec

SubAssign: enables a -= b

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

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

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 AncDec

Sum trait: enables iter.sum::<AncDec>()

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 AncDec

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 AncDec

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 AncDec

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 AncDec

Source§

impl Eq for AncDec

Eq trait: marker for total equality (no NaN)

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.