pub struct FixedPoint<I, P> { /* private fields */ }
Available on crate features i128 or i64 or i32 or i16 only.
Expand description

Abstraction over fixed point numbers of arbitrary (but only compile-time specified) size and precision.

The internal representation is a fixed point decimal number, an integer value pre-multiplied by 10 ^ PRECISION, where PRECISION is a compile-time-defined decimal places count.

Maximal possible value: MAX = (2 ^ (BITS_COUNT - 1) - 1) / 10 ^ PRECISION Maximal possible calculation error: ERROR_MAX = 0.5 / (10 ^ PRECISION)

E.g. for i64 with 9 decimal places:

MAX = (2 ^ (64 - 1) - 1) / 1e9 = 9223372036.854775807 ~ 9.2e9
ERROR_MAX = 0.5 / 1e9 = 5e-10

Implementations

Creates from the raw representation. 1 here is equal to 1**-P

Returns the raw representation.

Converts to the raw representation.

Available on crate feature i16 only.

The number of digits in the fractional part.

Available on crate feature i16 only.

The difference between 0.0 and the next larger representable number.

Available on crate feature i16 only.

Returns a number representing sign of self.

  • 0 if the number is zero
  • 1 if the number is positive
  • -1 if the number is negative
Available on crate feature i16 only.

Returns 1/n.

Available on crate feature i16 only.

Checked negation. Returns Err on overflow (you can’t negate MIN value).

Available on crate feature i16 only.

Calculates (a + b) / 2.

Available on crate feature i16 only.

Takes rounded integral part of the number.

use fixnum::{FixedPoint, typenum::U9, ops::RoundMode::*};

type Amount = FixedPoint<i64, U9>;

let a: Amount = "8273.519".parse()?;
assert_eq!(a.integral(Floor), 8273);
assert_eq!(a.integral(Nearest), 8274);
assert_eq!(a.integral(Ceil), 8274);

let a: Amount = "-8273.519".parse()?;
assert_eq!(a.integral(Floor), -8274);
assert_eq!(a.integral(Nearest), -8274);
assert_eq!(a.integral(Ceil), -8273);
Available on crate feature i16 only.

Returns the largest integer less than or equal to a number.

Available on crate feature i16 only.

Returns the smallest integer greater than or equal to a number.

Available on crate feature i16 only.

Returns the nearest integer to a number. Round half-way cases away from 0.0.

Available on crate feature i16 only.

Rounds towards zero by the provided precision.

Available on crate feature i16 only.

Returns the next power of ten:

  • For positive: the smallest greater than or equal to a number.
  • For negative: the largest less than or equal to a number.
Available on crate feature i16 only.

Returns the absolute value of a number.

Available on crate feature i16 only.

Checked rounding square root. Returns Err for negative argument.

Square root of a non-negative F is a non-negative S such that:

  • Floor: S ≤ sqrt(F)
  • Ceil: S ≥ sqrt(F)
  • Nearest: Floor or Ceil, which one is closer to sqrt(F)

The fastest mode is Floor.

use fixnum::{ArithmeticError, FixedPoint, typenum::U9};
use fixnum::ops::{Zero, RoundMode::*};

type Amount = FixedPoint<i64, U9>;

let a: Amount = "81".parse()?;
let b: Amount = "2".parse()?;
let c: Amount = "-100".parse()?;
assert_eq!(a.rsqrt(Floor)?, "9".parse()?);
assert_eq!(b.rsqrt(Floor)?, "1.414213562".parse()?);
assert_eq!(b.rsqrt(Ceil)?, "1.414213563".parse()?);
assert_eq!(c.rsqrt(Floor), Err(ArithmeticError::DomainViolation));
Available on crate feature i16 only.

Creates a new number from separate mantissa and exponent.

Available on crate feature i32 only.

The number of digits in the fractional part.

Available on crate feature i32 only.

The difference between 0.0 and the next larger representable number.

Available on crate feature i32 only.

Returns a number representing sign of self.

  • 0 if the number is zero
  • 1 if the number is positive
  • -1 if the number is negative
Available on crate feature i32 only.

Returns 1/n.

Available on crate feature i32 only.

Checked negation. Returns Err on overflow (you can’t negate MIN value).

Available on crate feature i32 only.

Calculates (a + b) / 2.

Available on crate feature i32 only.

Takes rounded integral part of the number.

use fixnum::{FixedPoint, typenum::U9, ops::RoundMode::*};

type Amount = FixedPoint<i64, U9>;

let a: Amount = "8273.519".parse()?;
assert_eq!(a.integral(Floor), 8273);
assert_eq!(a.integral(Nearest), 8274);
assert_eq!(a.integral(Ceil), 8274);

let a: Amount = "-8273.519".parse()?;
assert_eq!(a.integral(Floor), -8274);
assert_eq!(a.integral(Nearest), -8274);
assert_eq!(a.integral(Ceil), -8273);
Available on crate feature i32 only.

Returns the largest integer less than or equal to a number.

Available on crate feature i32 only.

Returns the smallest integer greater than or equal to a number.

Available on crate feature i32 only.

Returns the nearest integer to a number. Round half-way cases away from 0.0.

Available on crate feature i32 only.

Rounds towards zero by the provided precision.

Available on crate feature i32 only.

Returns the next power of ten:

  • For positive: the smallest greater than or equal to a number.
  • For negative: the largest less than or equal to a number.
Available on crate feature i32 only.

Returns the absolute value of a number.

Available on crate feature i32 only.

Checked rounding square root. Returns Err for negative argument.

Square root of a non-negative F is a non-negative S such that:

  • Floor: S ≤ sqrt(F)
  • Ceil: S ≥ sqrt(F)
  • Nearest: Floor or Ceil, which one is closer to sqrt(F)

The fastest mode is Floor.

use fixnum::{ArithmeticError, FixedPoint, typenum::U9};
use fixnum::ops::{Zero, RoundMode::*};

type Amount = FixedPoint<i64, U9>;

let a: Amount = "81".parse()?;
let b: Amount = "2".parse()?;
let c: Amount = "-100".parse()?;
assert_eq!(a.rsqrt(Floor)?, "9".parse()?);
assert_eq!(b.rsqrt(Floor)?, "1.414213562".parse()?);
assert_eq!(b.rsqrt(Ceil)?, "1.414213563".parse()?);
assert_eq!(c.rsqrt(Floor), Err(ArithmeticError::DomainViolation));
Available on crate feature i32 only.

Creates a new number from separate mantissa and exponent.

Available on crate feature i64 only.

The number of digits in the fractional part.

Available on crate feature i64 only.

The difference between 0.0 and the next larger representable number.

Available on crate feature i64 only.

Returns a number representing sign of self.

  • 0 if the number is zero
  • 1 if the number is positive
  • -1 if the number is negative
Available on crate feature i64 only.

Returns 1/n.

Available on crate feature i64 only.

Checked negation. Returns Err on overflow (you can’t negate MIN value).

Available on crate feature i64 only.

Calculates (a + b) / 2.

Available on crate feature i64 only.

Takes rounded integral part of the number.

use fixnum::{FixedPoint, typenum::U9, ops::RoundMode::*};

type Amount = FixedPoint<i64, U9>;

let a: Amount = "8273.519".parse()?;
assert_eq!(a.integral(Floor), 8273);
assert_eq!(a.integral(Nearest), 8274);
assert_eq!(a.integral(Ceil), 8274);

let a: Amount = "-8273.519".parse()?;
assert_eq!(a.integral(Floor), -8274);
assert_eq!(a.integral(Nearest), -8274);
assert_eq!(a.integral(Ceil), -8273);
Available on crate feature i64 only.

Returns the largest integer less than or equal to a number.

Available on crate feature i64 only.

Returns the smallest integer greater than or equal to a number.

Available on crate feature i64 only.

Returns the nearest integer to a number. Round half-way cases away from 0.0.

Available on crate feature i64 only.

Rounds towards zero by the provided precision.

Available on crate feature i64 only.

Returns the next power of ten:

  • For positive: the smallest greater than or equal to a number.
  • For negative: the largest less than or equal to a number.
Available on crate feature i64 only.

Returns the absolute value of a number.

Available on crate feature i64 only.

Checked rounding square root. Returns Err for negative argument.

Square root of a non-negative F is a non-negative S such that:

  • Floor: S ≤ sqrt(F)
  • Ceil: S ≥ sqrt(F)
  • Nearest: Floor or Ceil, which one is closer to sqrt(F)

The fastest mode is Floor.

use fixnum::{ArithmeticError, FixedPoint, typenum::U9};
use fixnum::ops::{Zero, RoundMode::*};

type Amount = FixedPoint<i64, U9>;

let a: Amount = "81".parse()?;
let b: Amount = "2".parse()?;
let c: Amount = "-100".parse()?;
assert_eq!(a.rsqrt(Floor)?, "9".parse()?);
assert_eq!(b.rsqrt(Floor)?, "1.414213562".parse()?);
assert_eq!(b.rsqrt(Ceil)?, "1.414213563".parse()?);
assert_eq!(c.rsqrt(Floor), Err(ArithmeticError::DomainViolation));
Available on crate feature i64 only.

Creates a new number from separate mantissa and exponent.

Available on crate feature i128 only.

The number of digits in the fractional part.

Available on crate feature i128 only.

The difference between 0.0 and the next larger representable number.

Available on crate feature i128 only.

Returns a number representing sign of self.

  • 0 if the number is zero
  • 1 if the number is positive
  • -1 if the number is negative
Available on crate feature i128 only.

Returns 1/n.

Available on crate feature i128 only.

Checked negation. Returns Err on overflow (you can’t negate MIN value).

Available on crate feature i128 only.

Calculates (a + b) / 2.

Available on crate feature i128 only.

Takes rounded integral part of the number.

use fixnum::{FixedPoint, typenum::U9, ops::RoundMode::*};

type Amount = FixedPoint<i64, U9>;

let a: Amount = "8273.519".parse()?;
assert_eq!(a.integral(Floor), 8273);
assert_eq!(a.integral(Nearest), 8274);
assert_eq!(a.integral(Ceil), 8274);

let a: Amount = "-8273.519".parse()?;
assert_eq!(a.integral(Floor), -8274);
assert_eq!(a.integral(Nearest), -8274);
assert_eq!(a.integral(Ceil), -8273);
Available on crate feature i128 only.

Returns the largest integer less than or equal to a number.

Available on crate feature i128 only.

Returns the smallest integer greater than or equal to a number.

Available on crate feature i128 only.

Returns the nearest integer to a number. Round half-way cases away from 0.0.

Available on crate feature i128 only.

Rounds towards zero by the provided precision.

Available on crate feature i128 only.

Returns the next power of ten:

  • For positive: the smallest greater than or equal to a number.
  • For negative: the largest less than or equal to a number.
Available on crate feature i128 only.

Returns the absolute value of a number.

Available on crate feature i128 only.

Checked rounding square root. Returns Err for negative argument.

Square root of a non-negative F is a non-negative S such that:

  • Floor: S ≤ sqrt(F)
  • Ceil: S ≥ sqrt(F)
  • Nearest: Floor or Ceil, which one is closer to sqrt(F)

The fastest mode is Floor.

use fixnum::{ArithmeticError, FixedPoint, typenum::U9};
use fixnum::ops::{Zero, RoundMode::*};

type Amount = FixedPoint<i64, U9>;

let a: Amount = "81".parse()?;
let b: Amount = "2".parse()?;
let c: Amount = "-100".parse()?;
assert_eq!(a.rsqrt(Floor)?, "9".parse()?);
assert_eq!(b.rsqrt(Floor)?, "1.414213562".parse()?);
assert_eq!(b.rsqrt(Ceil)?, "1.414213563".parse()?);
assert_eq!(c.rsqrt(Floor), Err(ArithmeticError::DomainViolation));
Available on crate feature i128 only.

Creates a new number from separate mantissa and exponent.

Trait Implementations

Represents MIN.

Represents MAX.

Represents MIN.

Represents MAX.

Represents MIN.

Represents MAX.

Represents MIN.

Represents MAX.

Result of addition.

Usually ArithmeticError.

Checked addition. Returns Err on overflow. Read more

Saturating addition. Computes self + rhs, saturating at the numeric bounds (MIN, MAX) instead of overflowing. Read more

Result of addition.

Usually ArithmeticError.

Checked addition. Returns Err on overflow. Read more

Saturating addition. Computes self + rhs, saturating at the numeric bounds (MIN, MAX) instead of overflowing. Read more

Result of addition.

Usually ArithmeticError.

Checked addition. Returns Err on overflow. Read more

Saturating addition. Computes self + rhs, saturating at the numeric bounds (MIN, MAX) instead of overflowing. Read more

Result of addition.

Usually ArithmeticError.

Checked addition. Returns Err on overflow. Read more

Saturating addition. Computes self + rhs, saturating at the numeric bounds (MIN, MAX) instead of overflowing. Read more

Result of multiplication.

Usually ArithmeticError.

Checked multiplication. Returns Err on overflow. This is multiplication without rounding, hence it’s available only when at least one operand is integer. Read more

Saturating multiplication. Computes self * rhs, saturating at the numeric bounds (MIN, MAX) instead of overflowing. This is multiplication without rounding, hence it’s available only when at least one operand is integer. Read more

Result of multiplication.

Usually ArithmeticError.

Checked multiplication. Returns Err on overflow. This is multiplication without rounding, hence it’s available only when at least one operand is integer. Read more

Saturating multiplication. Computes self * rhs, saturating at the numeric bounds (MIN, MAX) instead of overflowing. This is multiplication without rounding, hence it’s available only when at least one operand is integer. Read more

Result of multiplication.

Usually ArithmeticError.

Checked multiplication. Returns Err on overflow. This is multiplication without rounding, hence it’s available only when at least one operand is integer. Read more

Saturating multiplication. Computes self * rhs, saturating at the numeric bounds (MIN, MAX) instead of overflowing. This is multiplication without rounding, hence it’s available only when at least one operand is integer. Read more

Result of multiplication.

Usually ArithmeticError.

Checked multiplication. Returns Err on overflow. This is multiplication without rounding, hence it’s available only when at least one operand is integer. Read more

Saturating multiplication. Computes self * rhs, saturating at the numeric bounds (MIN, MAX) instead of overflowing. This is multiplication without rounding, hence it’s available only when at least one operand is integer. Read more

Result of multiplication.

Usually ArithmeticError.

Checked multiplication. Returns Err on overflow. This is multiplication without rounding, hence it’s available only when at least one operand is integer. Read more

Saturating multiplication. Computes self * rhs, saturating at the numeric bounds (MIN, MAX) instead of overflowing. This is multiplication without rounding, hence it’s available only when at least one operand is integer. Read more

Result of multiplication.

Usually ArithmeticError.

Checked multiplication. Returns Err on overflow. This is multiplication without rounding, hence it’s available only when at least one operand is integer. Read more

Saturating multiplication. Computes self * rhs, saturating at the numeric bounds (MIN, MAX) instead of overflowing. This is multiplication without rounding, hence it’s available only when at least one operand is integer. Read more

Result of multiplication.

Usually ArithmeticError.

Checked multiplication. Returns Err on overflow. This is multiplication without rounding, hence it’s available only when at least one operand is integer. Read more

Saturating multiplication. Computes self * rhs, saturating at the numeric bounds (MIN, MAX) instead of overflowing. This is multiplication without rounding, hence it’s available only when at least one operand is integer. Read more

Result of multiplication.

Usually ArithmeticError.

Checked multiplication. Returns Err on overflow. This is multiplication without rounding, hence it’s available only when at least one operand is integer. Read more

Saturating multiplication. Computes self * rhs, saturating at the numeric bounds (MIN, MAX) instead of overflowing. This is multiplication without rounding, hence it’s available only when at least one operand is integer. Read more

Result of subtraction.

Usually ArithmeticError.

Checked subtraction. Returns Err on overflow. Read more

Saturating subtraction. Computes self - rhs, saturating at the numeric bounds (MIN, MAX) instead of overflowing. Read more

Result of subtraction.

Usually ArithmeticError.

Checked subtraction. Returns Err on overflow. Read more

Saturating subtraction. Computes self - rhs, saturating at the numeric bounds (MIN, MAX) instead of overflowing. Read more

Result of subtraction.

Usually ArithmeticError.

Checked subtraction. Returns Err on overflow. Read more

Saturating subtraction. Computes self - rhs, saturating at the numeric bounds (MIN, MAX) instead of overflowing. Read more

Result of subtraction.

Usually ArithmeticError.

Checked subtraction. Returns Err on overflow. Read more

Saturating subtraction. Computes self - rhs, saturating at the numeric bounds (MIN, MAX) instead of overflowing. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

A compact-encodable type that should be used as the encoding.

Returns the compact-encodable type.

Decode Self from the compact-decoded type.

A compact-encodable type that should be used as the encoding.

Returns the compact-encodable type.

Decode Self from the compact-decoded type.

A compact-encodable type that should be used as the encoding.

Returns the compact-encodable type.

Decode Self from the compact-decoded type.

A compact-encodable type that should be used as the encoding.

Returns the compact-encodable type.

Decode Self from the compact-decoded type.

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Attempt to deserialise the value from input.

Attempt to skip the encoded value from input. Read more

Returns the fixed encoded size of the type. Read more

Attempt to deserialise the value from input.

Attempt to skip the encoded value from input. Read more

Returns the fixed encoded size of the type. Read more

Attempt to deserialise the value from input.

Attempt to skip the encoded value from input. Read more

Returns the fixed encoded size of the type. Read more

Attempt to deserialise the value from input.

Attempt to skip the encoded value from input. Read more

Returns the fixed encoded size of the type. Read more

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

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Convert self to a slice and append it to the destination.

If possible give a hint of expected size of the encoding. Read more

Convert self to an owned vector.

Convert self to a slice and then invoke the given closure with it.

Calculates the encoded size. Read more

Convert self to a slice and append it to the destination.

If possible give a hint of expected size of the encoding. Read more

Convert self to an owned vector.

Convert self to a slice and then invoke the given closure with it.

Calculates the encoded size. Read more

Convert self to a slice and append it to the destination.

If possible give a hint of expected size of the encoding. Read more

Convert self to an owned vector.

Convert self to a slice and then invoke the given closure with it.

Calculates the encoded size. Read more

Convert self to a slice and append it to the destination.

If possible give a hint of expected size of the encoding. Read more

Convert self to an owned vector.

Convert self to a slice and then invoke the given closure with it.

Calculates the encoded size. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

The associated error which can be returned from parsing.

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

The associated error which can be returned from parsing.

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

The associated error which can be returned from parsing.

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

The associated error which can be returned from parsing.

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

Feeds this value into the given Hasher. Read more

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

Represents 1.

Represents 1.

Represents 1.

Represents 1.

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Result of division.

Usually ArithmeticError.

Checked rounded division. Returns Err on overflow or attempt to divide by zero. Because of provided RoundMode it’s possible to perform across the FixedPoint values. Read more

Result of division.

Usually ArithmeticError.

Checked rounded division. Returns Err on overflow or attempt to divide by zero. Because of provided RoundMode it’s possible to perform across the FixedPoint values. Read more

Result of division.

Usually ArithmeticError.

Checked rounded division. Returns Err on overflow or attempt to divide by zero. Because of provided RoundMode it’s possible to perform across the FixedPoint values. Read more

Result of division.

Usually ArithmeticError.

Checked rounded division. Returns Err on overflow or attempt to divide by zero. Because of provided RoundMode it’s possible to perform across the FixedPoint values. Read more

Result of division.

Usually ArithmeticError.

Checked rounded division. Returns Err on overflow or attempt to divide by zero. Because of provided RoundMode it’s possible to perform across the FixedPoint values. Read more

Result of division.

Usually ArithmeticError.

Checked rounded division. Returns Err on overflow or attempt to divide by zero. Because of provided RoundMode it’s possible to perform across the FixedPoint values. Read more

Result of division.

Usually ArithmeticError.

Checked rounded division. Returns Err on overflow or attempt to divide by zero. Because of provided RoundMode it’s possible to perform across the FixedPoint values. Read more

Result of division.

Usually ArithmeticError.

Checked rounded division. Returns Err on overflow or attempt to divide by zero. Because of provided RoundMode it’s possible to perform across the FixedPoint values. Read more

Result of division.

Usually ArithmeticError.

Checked rounded division. Returns Err on overflow or attempt to divide by zero. Because of provided RoundMode it’s possible to perform across the FixedPoint values. Read more

Result of division.

Usually ArithmeticError.

Checked rounded division. Returns Err on overflow or attempt to divide by zero. Because of provided RoundMode it’s possible to perform across the FixedPoint values. Read more

Result of division.

Usually ArithmeticError.

Checked rounded division. Returns Err on overflow or attempt to divide by zero. Because of provided RoundMode it’s possible to perform across the FixedPoint values. Read more

Result of division.

Usually ArithmeticError.

Checked rounded division. Returns Err on overflow or attempt to divide by zero. Because of provided RoundMode it’s possible to perform across the FixedPoint values. Read more

Result of multiplication.

Usually ArithmeticError.

Checked rounded multiplication. Returns Err on overflow. Because of provided RoundMode it’s possible to perform across the FixedPoint values. Read more

Saturating rounding multiplication. Computes self * rhs, saturating at the numeric bounds (MIN, MAX) instead of overflowing. Because of provided RoundMode it’s possible to perform across the FixedPoint values. Read more

Result of multiplication.

Usually ArithmeticError.

Checked rounded multiplication. Returns Err on overflow. Because of provided RoundMode it’s possible to perform across the FixedPoint values. Read more

Saturating rounding multiplication. Computes self * rhs, saturating at the numeric bounds (MIN, MAX) instead of overflowing. Because of provided RoundMode it’s possible to perform across the FixedPoint values. Read more

Result of multiplication.

Usually ArithmeticError.

Checked rounded multiplication. Returns Err on overflow. Because of provided RoundMode it’s possible to perform across the FixedPoint values. Read more

Saturating rounding multiplication. Computes self * rhs, saturating at the numeric bounds (MIN, MAX) instead of overflowing. Because of provided RoundMode it’s possible to perform across the FixedPoint values. Read more

Result of multiplication.

Usually ArithmeticError.

Checked rounded multiplication. Returns Err on overflow. Because of provided RoundMode it’s possible to perform across the FixedPoint values. Read more

Saturating rounding multiplication. Computes self * rhs, saturating at the numeric bounds (MIN, MAX) instead of overflowing. Because of provided RoundMode it’s possible to perform across the FixedPoint values. Read more

Serialize this value into the given Serde serializer. Read more

Implementation courtesy of rust_decimal crate

The type returned in the event of a conversion error.

Implementation courtesy of rust_decimal crate

The type returned in the event of a conversion error.

Implementation courtesy of rust_decimal crate

The type returned in the event of a conversion error.

Implementation courtesy of rust_decimal crate

The type returned in the event of a conversion error.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Represents 0.

Represents 0.

Represents 0.

Represents 0.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Decode Self and consume all of the given input data. Read more

Decode Self and consume all of the given input data. Read more

Decode Self with the given maximum recursion depth and advance input by the number of bytes consumed. Read more

Returns the argument unchanged.

The compact type; this can be

Calls U::from(self).

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

Return an encoding of Self prepended by given slice.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.