Skip to main content

AncDec8

Struct AncDec8 

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

8-bit fixed-point decimal (u8 int/frac, 2-digit precision, 4 bytes).

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

§Example

use ancdec::AncDec8;
let a: AncDec8 = "1.23".parse().unwrap();
assert_eq!(a.int(), 1);

Implementations§

Source§

impl AncDec8

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.

Source

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

Divides self by other, panics on division by zero.

Source

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

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

Source

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

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

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

Source

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

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

Source§

impl AncDec8

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 1 fractional digit 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 AncDec8

Source

pub fn to_f64(&self) -> f64

Converts to f64 (may lose precision).

Source

pub fn to_i64(&self) -> i64

Converts to i64, truncating the fractional part.

Source

pub fn to_i128(&self) -> i128

Converts to i128, truncating the fractional part.

Source§

impl AncDec8

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 AncDec8

Source

pub const ZERO: AncDec8

The value 0.

Source

pub const ONE: AncDec8

The value 1.

Source

pub const TWO: AncDec8

The value 2.

Source

pub const TEN: AncDec8

The value 10.

Source

pub const MAX: AncDec8

The maximum representable value (255.99).

Source§

impl AncDec8

Source

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

Creates a new AncDec8. Panics if scale > 2 or frac >= 10^scale.

Source

pub fn int(&self) -> u8

Returns the integer part.

Source

pub fn frac(&self) -> u8

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-2).

Source

pub fn is_neg(&self) -> bool

Returns true if the value is negative.

Source§

impl AncDec8

Source

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

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

Trait Implementations§

Source§

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

Source§

type Output = AncDec8

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

type Output = AncDec8

The resulting type after applying the + operator.
Source§

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

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

Available on crate features dec8 and dec32 only.
Source§

type Output = AncDec32

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<AncDec8> for &AncDec8

Source§

type Output = AncDec8

The resulting type after applying the + operator.
Source§

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

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

Available on crate features dec8 and dec32 only.
Source§

type Output = AncDec32

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<AncDec8> for i8

Source§

type Output = AncDec8

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<AncDec8> for u8

Source§

type Output = AncDec8

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<i8> for AncDec8

Source§

type Output = AncDec8

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<u8> for AncDec8

Source§

type Output = AncDec8

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add for AncDec8

Source§

type Output = AncDec8

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl AddAssign for AncDec8

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl Clone for AncDec8

Source§

fn clone(&self) -> AncDec8

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 AncDec8

Source§

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

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

impl Default for AncDec8

Source§

fn default() -> Self

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

impl Display for AncDec8

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

Source§

type Output = AncDec8

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

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

Source§

type Output = AncDec8

The resulting type after applying the / operator.
Source§

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

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

Available on crate features dec8 and dec32 only.
Source§

type Output = AncDec32

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<AncDec8> for &AncDec8

Source§

type Output = AncDec8

The resulting type after applying the / operator.
Source§

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

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

Available on crate features dec8 and dec32 only.
Source§

type Output = AncDec32

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<AncDec8> for i8

Source§

type Output = AncDec8

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<AncDec8> for u8

Source§

type Output = AncDec8

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<i8> for AncDec8

Source§

type Output = AncDec8

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<u8> for AncDec8

Source§

type Output = AncDec8

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div for AncDec8

Source§

type Output = AncDec8

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl DivAssign for AncDec8

Source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
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<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<AncDec8> for AncDec32

Available on crate feature dec8 only.

Lossless widening from AncDec8 (u8) to AncDec32 (u32)

Source§

fn from(a: AncDec8) -> Self

Converts to this type from the input type.
Source§

impl From<i8> for AncDec8

Source§

fn from(n: i8) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for AncDec8

Source§

fn from(n: u8) -> Self

Converts to this type from the input type.
Source§

impl FromStr for AncDec8

FromStr trait: enables "1.23".parse::<AncDec8>()

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 AncDec8

Normalizes trailing zeros so 1.0 == 1.00 have same hash Uses u16 combined value

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

Source§

type Output = AncDec8

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

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

Source§

type Output = AncDec8

The resulting type after applying the * operator.
Source§

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

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

Available on crate features dec8 and dec32 only.
Source§

type Output = AncDec32

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<AncDec8> for &AncDec8

Source§

type Output = AncDec8

The resulting type after applying the * operator.
Source§

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

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

Available on crate features dec8 and dec32 only.
Source§

type Output = AncDec32

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<AncDec8> for i8

Source§

type Output = AncDec8

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<AncDec8> for u8

Source§

type Output = AncDec8

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<i8> for AncDec8

Source§

type Output = AncDec8

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<u8> for AncDec8

Source§

type Output = AncDec8

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul for AncDec8

Source§

type Output = AncDec8

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl MulAssign for AncDec8

Source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
Source§

impl Neg for &AncDec8

Source§

type Output = AncDec8

The resulting type after applying the - operator.
Source§

fn neg(self) -> AncDec8

Performs the unary - operation. Read more
Source§

impl Neg for AncDec8

Source§

type Output = AncDec8

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self

Performs the unary - operation. Read more
Source§

impl Ord for AncDec8

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 AncDec8

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 AncDec8

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

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 AncDec8

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

Source§

type Output = AncDec8

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

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

Source§

type Output = AncDec8

The resulting type after applying the % operator.
Source§

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

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 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 AncDec8

Available on crate features dec8 and dec32 only.
Source§

type Output = AncDec32

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

impl Rem<AncDec8> for &AncDec8

Source§

type Output = AncDec8

The resulting type after applying the % operator.
Source§

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

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

Available on crate features dec8 and dec32 only.
Source§

type Output = AncDec32

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

impl Rem for AncDec8

Source§

type Output = AncDec8

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

impl RemAssign for AncDec8

Source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
Source§

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

Source§

type Output = AncDec8

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

type Output = AncDec8

The resulting type after applying the - operator.
Source§

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

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

Available on crate features dec8 and dec32 only.
Source§

type Output = AncDec32

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<AncDec8> for &AncDec8

Source§

type Output = AncDec8

The resulting type after applying the - operator.
Source§

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

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

Available on crate features dec8 and dec32 only.
Source§

type Output = AncDec32

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<AncDec8> for i8

Source§

type Output = AncDec8

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<AncDec8> for u8

Source§

type Output = AncDec8

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<i8> for AncDec8

Source§

type Output = AncDec8

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<u8> for AncDec8

Source§

type Output = AncDec8

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub for AncDec8

Source§

type Output = AncDec8

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl SubAssign for AncDec8

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

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

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 AncDec8

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 AncDec8

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 AncDec8

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 AncDec8

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 AncDec8

Source§

impl Eq for AncDec8

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.