Struct dashu_float::FBig

source ·
pub struct FBig<RoundingMode: Round = Zero, const BASE: Word = 2> { /* private fields */ }
Expand description

An arbitrary precision floating point number with arbitrary base and rounding mode.

The float number consists of a Repr and a Context. The Repr instance determines the value of the number, and the Context contains runtime information (such as precision limit, rounding mode, etc.)

For how the number is represented, see Repr, for how the precision limit and rounding mode is applied, see Context.

The arithmetic operations on FBig follows the behavior of its associated context. If a different precision limit and/or rounding mode is required, or the rounding information has to be preserved, use the methods of the Context type.

Generic Parameters

The const generic parameters will be abbreviated as BASE -> B, RoundingMode -> R. THe BASE must be in range [2, isize::MAX], and the RoundingMode can be chosen from the mode module.

With the default generic parameters, the floating number is of base 2 rounded towards zero. This is the most efficient format for operations. To represent a decimal number, the alias DBig is provided, which is base 10 rounded to the nearest.

Parsing and printing

To create a FBig instance, there are four ways:

  1. Use predifined constants (e.g. FBig::ZERO, FBig::ONE, FBig::NEG_INFINITY).
  2. Use the literal macro fbig! or dbig! defined in the dashu-macro crate.
  3. Construct from the significand and exponent using from_parts() or from_parts_const().
  4. Parse from a string.

Conversion from and to str is limited to native radix (i.e. base). To print or parse with different radix, please use to_binary(), to_decimal() or with_base(), with_base_and_precision() to convert.

For printing, currently only the Display and Debug are supported. Other formatting traits will be supported in future.

// parsing
let a = DBig::from_parts(123456789.into(), -5);
let b = DBig::from_str_native("1234.56789")?;
let c = DBig::from_str_native("1.23456789e3")?;
assert_eq!(a, b);
assert_eq!(b, c);

// printing
assert_eq!(format!("{}", DBig::from_str_native("12.34")?), "12.34");
let x = DBig::from_str_native("10.01")?
    .with_precision(0) // use unlimited precision
    .value();
if dashu_int::Word::BITS == 64 {
    // number of digits to display depends on the word size
    assert_eq!(
        format!("{:?}", x.powi(100.into())),
        "1105115697720767968..1441386704950100001 * 10 ^ -200 (prec: 0, rnd: HalfAway)"
    );
}

For detailed information of parsing, refer to the from_str_native() method.

Restriction on binary operators

Binary operators on FBig instances are restricted to the same base and same rounding mode. This is designed to make sure that no hidden conversion is performed during the operators. However, for equality test and comparsion, two FBig instances can have different rounding modes (but not different bases), because rounding will never happends during comparison.

The infinities are converted as it is, and the subnormals are converted using its actual values.

IEEE 754 behavior compliance

The representation of the floating point number doesn’t follows the IEEE 754 standard, as it’s not designed for arbitrary precision numbers. The key differences include:

  • FBig doesn’t support NaN values. In places where IEEE 754 operations generate NaNs, FBig will panic.
  • FBig doesn’t have subnormal values.
  • FBig doesn’t have negative zeros¹. There is only on zero value (FBig::ZERO).
  • Division by zero and logarithm on zero panic instead of returning infinities.
  • FBig operations will panic if the result overflows or underflows¹.
  • FBig does support infinities, but currently infinities are not allowed to be operated with, except for equality test and comparison¹.

¹ These behaviors are subject to changes in the future.

Convert from/to f32/f64

Converting from f32/f64 to FBig is only defined for base 2 FBig (using TryFrom) to ensure the conversion is lossless. Since FBig doesn’t support NANs, converting f32::NAN or f64::NAN will return Err.

Converting to f32/f64 (using to_f32() and to_f64()) can be lossy, and the rounding direction is contained in the result of these two methods. To use the default IEEE 754 rounding mode (rounding to nearest), the Repr::to_f32 and Repr::to_f64 methods can be used for convenience.

Convert from/to UBig/IBig

Converting from UBig and IBig is trivial and lossless through From. However, the reverse direction can be lossy.

The TryFrom trait and to_int() method are the two supported ways to convert from FBig to IBig. To convert to UBig, please first convert to IBig. When converting to IBig, TryFrom returns Ok only when the floating point number is not infinite and doesn’t have fractional part. To convert with rounding, use to_int() instead.

Implementations§

Convert the float number to base 10 (with decimal exponents).

It’s equivalent to self.with_base::<10>(). See with_base() for the precision and rounding behavior.

Examples
use dashu_base::Approximation::*;
use dashu_float::round::{mode::HalfAway, Rounding::*};

assert_eq!(
    FBig::<HalfAway, 2>::from_str_native("0x1234")?.to_decimal(),
    Exact(DBig::from_str_native("4660")?)
);
assert_eq!(
    FBig::<HalfAway, 2>::from_str_native("0x12.34")?.to_decimal(),
    Inexact(DBig::from_str_native("18.20")?, NoOp)
);
assert_eq!(
    FBig::<HalfAway, 2>::from_str_native("0x1.234p-4")?.to_decimal(),
    Inexact(DBig::from_str_native("0.07111")?, AddOne)
);
Panics

Panics if the associated context has unlimited precision and the conversion cannot be performed losslessly.

Convert the float number to base 2 (with binary exponents).

It’s equivalent to self.with_base::<2>(). See with_base() for the precision and rounding behavior.

Examples
use dashu_base::Approximation::*;
use dashu_float::round::{mode::HalfAway, Rounding::*};

assert_eq!(
    DBig::from_str_native("1234")?.to_binary(),
    Exact(FBig::<HalfAway, 2>::from_str_native("0x4d2")?)
);
assert_eq!(
    DBig::from_str_native("12.34")?.to_binary(),
    Inexact(FBig::<HalfAway, 2>::from_str_native("0xc.57")?, NoOp)
);
assert_eq!(
    DBig::from_str_native("1.234e-1")?.to_binary(),
    Inexact(FBig::<HalfAway, 2>::from_str_native("0x1.f97p-4")?, NoOp)
);
Panics

Panics if the associated context has unlimited precision and the conversion cannot be performed losslessly.

Explicitly change the precision of the float number.

If the given precision is less than the current value in the context, it will be rounded with the rounding mode specified by the generic parameter.

Examples
use dashu_base::Approximation::*;
use dashu_float::round::{mode::HalfAway, Rounding::*};

let a = DBig::from_str_native("2.345")?;
assert_eq!(a.precision(), 4);
assert_eq!(
    a.clone().with_precision(3),
    Inexact(DBig::from_str_native("2.35")?, AddOne)
);
assert_eq!(
    a.clone().with_precision(5),
    Exact(DBig::from_str_native("2.345")?)
);

Explicitly change the rounding mode of the number.

This operation doesn’t modify the underlying representation, it only changes the rounding mode in the context.

Examples
use dashu_base::Approximation::*;
use dashu_float::round::{mode::{HalfAway, Zero}, Rounding::*};

type DBigHalfAway = DBig;
type DBigZero = FBig::<Zero, 10>;

let a = DBigHalfAway::from_str_native("2.345")?;
let b = DBigZero::from_str_native("2.345")?;
assert_eq!(a.with_rounding::<Zero>(), b);

Explicitly change the base of the float number.

This function internally calls with_base_and_precision. The precision of the result number will be calculated in such a way that the new limit of the significand is less than or equal to before. That is, the new precision will be the max integer such that

NewB ^ new_precision <= B ^ old_precision

If any rounding happens during the conversion, it follows the rounding mode specified by the generic parameter.

Examples
use dashu_base::Approximation::*;
use dashu_float::round::{mode::Zero, Rounding::*};

type FBin = FBig;
type FDec = FBig<Zero, 10>;
type FHex = FBig<Zero, 16>;

let a = FBin::from_str_native("0x1.234")?; // 0x1234 * 2^-12
assert_eq!(
    a.clone().with_base::<10>(),
    // 1.1376953125 rounded towards zero
    Inexact(FDec::from_str_native("1.137")?, NoOp)
);
assert_eq!(
    a.clone().with_base::<16>(),
    // conversion is exact when the new base is a power of the old base
    Exact(FHex::from_str_native("1.234")?)
);
Panics

Panics if the associated context has unlimited precision and the conversion cannot be performed losslessly.

Explicitly change the base of the float number with given precision (under the new base).

Infinities are mapped to infinities inexactly, the error will be NoOp.

Conversion for float numbers with unlimited precision is only allowed in following cases:

  • The number is infinite
  • The new base NewB is a power of B
  • B is a power of the new base NewB
Examples
use dashu_base::Approximation::*;
use dashu_float::round::{mode::Zero, Rounding::*};

type FBin = FBig;
type FDec = FBig<Zero, 10>;
type FHex = FBig<Zero, 16>;

let a = FBin::from_str_native("0x1.234")?; // 0x1234 * 2^-12
assert_eq!(
    a.clone().with_base_and_precision::<10>(8),
    // 1.1376953125 rounded towards zero
    Inexact(FDec::from_str_native("1.1376953")?, NoOp)
);
assert_eq!(
    a.clone().with_base_and_precision::<16>(8),
    // conversion can be exact when the new base is a power of the old base
    Exact(FHex::from_str_native("1.234")?)
);
assert_eq!(
    a.clone().with_base_and_precision::<16>(2),
    // but the conversion is still inexact if the target precision is smaller
    Inexact(FHex::from_str_native("1.2")?, NoOp)
);
Panics

Panics if the associated context has unlimited precision and the conversion cannot be performed losslessly.

Convert the float number to integer with the given rounding mode.

Warning

If the float number has a very large exponent, it will be evaluated and result in allocating an huge integer and it might eat up all your memory.

To get a rough idea of how big the number is, it’s recommended to use EstimatedLog2.

Examples
use dashu_base::Approximation::*;
use dashu_float::round::Rounding::*;

assert_eq!(
    DBig::from_str_native("1234")?.to_int(),
    Exact(1234.into())
);
assert_eq!(
    DBig::from_str_native("1.234e6")?.to_int(),
    Exact(1234000.into())
);
assert_eq!(
    DBig::from_str_native("1.234")?.to_int(),
    Inexact(1.into(), NoOp)
);
Panics

Panics if the number is infinte

Convert the float number to f32 with HalfEven rounding mode regardless of the mode associated with this number.

Examples
assert_eq!(DBig::from_str_native("1.234")?.to_f32().value(), 1.234);
assert_eq!(DBig::INFINITY.to_f32().value(), f32::INFINITY);

Convert the float number to f64 with HalfEven rounding mode regardless of the mode associated with this number.

Examples
assert_eq!(DBig::from_str_native("1.234")?.to_f64().value(), 1.234);
assert_eq!(DBig::INFINITY.to_f64().value(), f64::INFINITY);

Raise the floating point number to an integer power.

Examples
let a = DBig::from_str_native("-1.234")?;
assert_eq!(a.powi(10.into()), DBig::from_str_native("8.188")?);

Raise the floating point number to an floating point power.

Examples
let x = DBig::from_str_native("1.23")?;
let y = DBig::from_str_native("-4.56")?;
assert_eq!(x.powf(&y), DBig::from_str_native("0.389")?);

Calculate the exponential function () on the floating point number.

Examples
let a = DBig::from_str_native("-1.234")?;
assert_eq!(a.exp(), DBig::from_str_native("0.2911")?);

Calculate the exponential minus one function (eˣ-1) on the floating point number.

Examples
let a = DBig::from_str_native("-0.1234")?;
assert_eq!(a.exp_m1(), DBig::from_str_native("-0.11609")?);

Create a FBig instance from Repr and Context.

This method should not be used in most cases. It’s designed to be used when you hold a Repr instance and want to create an FBig from that.

Examples
use dashu_float::{Repr, Context};

assert_eq!(DBig::from_repr(Repr::one(), Context::new(1)), DBig::ONE);
assert_eq!(DBig::from_repr(Repr::infinity(), Context::new(1)), DBig::INFINITY);
Panics

Panics if the Repr has more digits than the precision limit specified in the context. Note that this condition is not checked in release build.

FBig with value 0 and unlimited precision

To test if the float number is zero, use self.repr().is_zero().

FBig with value 1 and unlimited precision

To test if the float number is one, use self.repr().is_one().

FBig with value -1 and unlimited precision

FBig instance representing the positive infinity (+∞)

To test if the float number is infinite, use self.repr().infinite().

FBig instance representing the negative infinity (-∞)

To test if the float number is infinite, use self.repr().infinite().

Get the maximum precision set for the float number.

It’s equivalent to self.context().precision().

Examples
use dashu_float::Repr;

let a = DBig::from_str_native("1.234")?;
assert!(a.repr().significand() <= &Repr::<10>::BASE.pow(a.precision()));

Get the number of the significant digits in the float number

It’s equivalent to self.repr().digits().

This value is also the actual precision needed for the float number. Shrink to this value using with_precision() will not cause loss of float precision.

Examples
use dashu_base::Approximation::*;

let a = DBig::from_str_native("-1.234e-3")?;
assert_eq!(a.digits(), 4);
assert!(matches!(a.clone().with_precision(4), Exact(_)));
assert!(matches!(a.clone().with_precision(3), Inexact(_, _)));

Get the context associated with the float number

Get a reference to the underlying numeric representation

Get the underlying numeric representation

Examples
use dashu_float::Repr;

let a = DBig::ONE;
assert_eq!(a.into_repr(), Repr::<10>::one());

Convert raw parts (significand, exponent) into a float number.

The precision will be inferred from significand (the lowest k such that significand <= base^k)

Examples
let a = DBig::from_parts((-1234).into(), -2);
assert_eq!(a, DBig::from_str_native("-12.34")?);
assert_eq!(a.precision(), 4); // 1234 has 4 (decimal) digits

Convert raw parts (significand, exponent) into a float number in a const context.

It requires that the significand fits in a DoubleWord.

The precision will be inferred from significand (the lowest k such that significand <= base^k). If the min_precision is provided, then the higher one from the given and inferred precision will be used as the final precision.

Examples
use dashu_base::Sign;

const A: DBig = DBig::from_parts_const(Sign::Negative, 1234, -2, None);
assert_eq!(A, DBig::from_str_native("-12.34")?);
assert_eq!(A.precision(), 4); // 1234 has 4 (decimal) digits

const B: DBig = DBig::from_parts_const(Sign::Negative, 1234, -2, Some(5));
assert_eq!(B.precision(), 5); // overrided by the argument

Return the value of the least significant digit of the float number x, such that x + ulp is the first float number greater than x (given the precision from the context).

Examples
assert_eq!(DBig::from_str_native("1.23")?.ulp(), DBig::from_str_native("0.01")?);
assert_eq!(DBig::from_str_native("01.23")?.ulp(), DBig::from_str_native("0.001")?);

Calculate the natural logarithm function (log(x)) on the float number.

Examples
let a = DBig::from_str_native("1.234")?;
assert_eq!(a.ln(), DBig::from_str_native("0.2103")?);

Calculate the natural logarithm function (log(x+1)) on the float number

Examples
let a = DBig::from_str_native("0.1234")?;
assert_eq!(a.ln_1p(), DBig::from_str_native("0.11636")?);

Compute the square of this number (self * self)

Examples
let a = DBig::from_str_native("-1.234")?;
assert_eq!(a.square(), DBig::from_str_native("1.523")?);

Compute the square of this number (self * self)

Examples
let a = DBig::from_str_native("-1.234")?;
assert_eq!(a.cubic(), DBig::from_str_native("-1.879")?);

Convert a string in the native base (i.e. radix B) to FBig.

If the parsing succeeded, the result number will be losslessly parsed from the input string.

This function is the actual implementation of the FromStr trait.

Note: Infinites are intentionally not supported by this function.

Format

The valid representations include

  1. aaa or aaa.
    • aaa is represented in native base B without base prefixes.
  2. aaa.bbb = aaabbb / base ^ len(bbb)
    • aaa and bbb are represented in native base B without base prefixes.
    • len(bbb) represents the number of digits in bbb, e.g len(bbb) is 3. (Same below)
  3. aaa.bbb@cc = aaabbb * base ^ (cc - len(bbb))
    • aaa and bbb are represented in native base B
    • This is consistent with the representation used by GNU GMP.
  4. aaa.bbbEcc = aaabbb * 10 ^ (cc - len(bbb))
    • E could be lower case, base B must be 10
    • aaa and bbb are all represented in decimal
  5. 0xaaa or 0xaaa
  6. 0xaaa.bbb = 0xaaabbb / 16 ^ len(bbb)
  7. 0xaaa.bbbPcc = 0xaaabbb / 16 ^ len(bbb) * 2 ^ cc
    • P could be lower case, base B must be 2 (not 16!)
    • aaa and bbb are represented in hexadecimal
    • This is consistent with the C++ hexadecimal literals.
  8. aaa.bbbBcc = aaabbb * 2 ^ (cc - len(bbb))
  9. aaa.bbbOcc = aaabbb * 8 ^ (cc - len(bbb))
  10. aaa.bbbHcc = aaabbb * 16 ^ (cc - len(bbb))
    • B/O/H could be lower case, and base B must be consistent with the marker.
    • aaa and bbb are represented in binary/octal/hexadecimal correspondingly without prefix.
    • This is consistent with some scientific notations described in Wikipedia.

Digits 10-35 are represented by a-z or A-Z.

Literal aaa and cc above can be signed, but bbb must be unsigned. All cc are represented in decimal. Either aaa or bbb can be omitted when its value is zero, but they are not allowed to be omitted at the same time.

Precision

The precision of the parsed number is determined by the number of digits that are presented in the input string. For example, the numbers parsed from 12.34 or 1.234e-1 will have a precision of 4, while the ones parsed from 12.34000 or 00012.34 will have a precision of 7.

Examples
use dashu_base::Approximation::*;

let a = DBig::from_str_native("-1.23400e-3")?;
let b = DBig::from_str_native("-123.4@-05")?;
assert_eq!(a, b);
assert_eq!(a.precision(), 6);
assert_eq!(b.precision(), 4);

assert!(DBig::from_str_native("-0x1.234p-3").is_err());
assert!(DBig::from_str_native("-1.234H-3").is_err());
Panics

Panics if the base B is not between MIN_RADIX and MAX_RADIX inclusive.

Calculate the square root of the floating point number.

Examples
let a = DBig::from_str_native("1.23")?;
assert_eq!(a.sqrt(), DBig::from_str_native("1.11")?);

Get the integral part of the float

See FBig::round for how the output precision is determined.

Examples
let a = DBig::from_str_native("1.234")?;
assert_eq!(a.trunc(), DBig::from_str_native("1")?);
// the actual precision of the integral part is 1 digit
assert_eq!(a.trunc().precision(), 1);
Panics

Panics if the number is infinte

Split the rational number into integral and fractional parts (split at the radix point)

It’s equivalent to (self.trunc(), self.fract())

Examples
let a = DBig::from_str_native("1.234")?;
let (trunc, fract) = a.split_at_point();
assert_eq!(trunc, DBig::from_str_native("1.0")?);
assert_eq!(fract, DBig::from_str_native("0.234")?);
// the actual precision of the fractional part is 3 digits
assert_eq!(trunc.precision(), 1);
assert_eq!(fract.precision(), 3);

Get the fractional part of the float

Note: this function will adjust the precision accordingly!

Examples
let a = DBig::from_str_native("1.234")?;
assert_eq!(a.fract(), DBig::from_str_native("0.234")?);
// the actual precision of the fractional part is 3 digits
assert_eq!(a.fract().precision(), 3);
Panics

Panics if the number is infinte

Returns the smallest integer greater than or equal to self.

See FBig::round for how the output precision is determined.

Examples
let a = DBig::from_str_native("1.234")?;
assert_eq!(a.ceil(), DBig::from_str_native("2")?);

// works for very large exponent
let b = DBig::from_str_native("1.234e10000")?;
assert_eq!(b.ceil(), b);
Panics

Panics if the number is infinte

Returns the largest integer less than or equal to self.

See FBig::round for how the output precision is determined.

Examples
let a = DBig::from_str_native("1.234")?;
assert_eq!(a.floor(), DBig::from_str_native("1")?);

// works for very large exponent
let b = DBig::from_str_native("1.234e10000")?;
assert_eq!(b.floor(), b);
Panics

Panics if the number is infinte

Returns the integer nearest to self.

If there are two integers equally close, then the one farther from zero is chosen.

Examples
let a = DBig::from_str_native("1.234")?;
assert_eq!(a.round(), DBig::from_str_native("1")?);

// works for very large exponent
let b = DBig::from_str_native("1.234e10000")?;
assert_eq!(b.round(), b);
Precision

If self is an integer, the result will have the same precision as self. If self has fractional part, then the precision will be subtracted by the digits in the fractional part. Examples:

  • 1.00e100 (precision = 3) rounds to 1.00e100 (precision = 3)
  • 1.234 (precision = 4) rounds to 1. (precision = 1)
  • 1.234e-10 (precision = 4) rounds to 0. (precision = 0, i.e arbitrary precision)
Panics

Panics if the number is infinte

Get the sign of the number. Zero value has a positive sign.

Examples
assert_eq!(DBig::ZERO.sign(), Sign::Positive);
assert_eq!(DBig::from_str_native("-1.234")?.sign(), Sign::Negative);

A number representing the sign of self.

Examples
assert_eq!(DBig::from_str_native("2.01")?.signum(), DBig::ONE);
assert_eq!(DBig::from_str_native("-1.234")?.signum(), DBig::NEG_ONE);

Trait Implementations§

The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Default value: 0.

Deserialize this value from the given Serde deserializer. Read more
Formats the value using the given formatter. Read more
Generate a random value of T, using rng as the source of randomness.
Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Create a distribution of values of ‘S’ by mapping the output of Self through the closure F Read more
Generate a random value of T, using rng as the source of randomness.
Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Create a distribution of values of ‘S’ by mapping the output of Self through the closure F Read more
Generate a random value of T, using rng as the source of randomness.
Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Create a distribution of values of ‘S’ by mapping the output of Self through the closure F Read more
Generate a random value of T, using rng as the source of randomness.
Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Create a distribution of values of ‘S’ by mapping the output of Self through the closure F Read more
Generate a random value of T, using rng as the source of randomness.
Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Create a distribution of values of ‘S’ by mapping the output of Self through the closure F Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Estimate the bounds of the binary logarithm. Read more
Estimate the value of the binary logarithm. It’s calculated as the average of log2_bounds by default. Read more
Calculates Euclidean division, the matching method for rem_euclid. Read more
Calculates the least nonnegative remainder of self (mod v). 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.
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.
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 an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Converts a f64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Determines if a value of this type can be created from the specified Postgres Type. Read more
Creates a new value of this type from a buffer of data of the specified Postgres Type in its binary format. Read more
Creates a new value of this type from a NULL SQL value. Read more
A convenience function that delegates to from_sql and from_sql_null depending on the value of raw. Read more
See the trait documentation.
See the trait documentation.
A specialized variant of from_sql for handling null values. 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 resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
The resulting type after applying the - operator.
Performs the unary - operation. Read more
The resulting type after applying the - operator.
Performs the unary - operation. Read more
Convert from a string and radix (typically 2..=36). Read more
Returns the multiplicative identity element of Self, 1. Read more
Returns true if self is equal to the multiplicative identity. Read more
Sets self to the multiplicative identity element of Self, 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 !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
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
The result after applying the operator.
Returns self to the power rhs. Read more
The result after applying the operator.
Returns self to the power rhs. Read more
The result after applying the operator.
Returns self to the power rhs. Read more
The result after applying the operator.
Returns self to the power rhs. Read more
Method which takes an iterator and generates Self from the elements by multiplying the items. Read more
The resulting type after applying the % operator.
Performs the % operation. Read more
The resulting type after applying the % operator.
Performs the % operation. Read more
The resulting type after applying the % operator.
Performs the % operation. Read more
The resulting type after applying the % operator.
Performs the % operation. Read more
Performs the %= operation. Read more
Performs the %= operation. Read more
The UniformSampler implementation supporting type X.
Serialize this value into the given Serde serializer. Read more
The resulting type after applying the << operator.
Performs the << operation. Read more
Performs the <<= operation. Read more
The resulting type after applying the >> operator.
Performs the >> operation. Read more
Performs the >>= operation. Read more
Computes the absolute value. Read more
The positive difference of two numbers. Read more
Returns the sign of the number. Read more
Returns true if the number is positive and false if the number is zero or negative.
Returns true if the number is negative and false if the number is zero or positive.
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Method which takes an iterator and generates Self from the elements by “summing up” the items. Read more
Converts the value of self to an i8. If the value cannot be represented by an i8, then None is returned. Read more
Converts the value of self to an i16. If the value cannot be represented by an i16, then None is returned. Read more
Converts the value of self to an i32. If the value cannot be represented by an i32, then None is returned. Read more
Converts the value of self to an i64. If the value cannot be represented by an i64, then None is returned. Read more
Converts the value of self to an i128. If the value cannot be represented by an i128 (i64 under the default implementation), then None is returned. Read more
Converts the value of self to an isize. If the value cannot be represented by an isize, then None is returned. Read more
Converts the value of self to a u8. If the value cannot be represented by a u8, then None is returned. Read more
Converts the value of self to a u16. If the value cannot be represented by a u16, then None is returned. Read more
Converts the value of self to a u32. If the value cannot be represented by a u32, then None is returned. Read more
Converts the value of self to a u64. If the value cannot be represented by a u64, then None is returned. Read more
Converts the value of self to a u128. If the value cannot be represented by a u128 (u64 under the default implementation), then None is returned. Read more
Converts the value of self to a usize. If the value cannot be represented by a usize, then None is returned. Read more
Converts the value of self to an f32. Overflows may map to positive or negative inifinity, otherwise None is returned if the value cannot be represented by an f32. Read more
Converts the value of self to an f64. Overflows may map to positive or negative inifinity, otherwise None is returned if the value cannot be represented by an f64. Read more
See the trait documentation.
See the trait documentation.
Determines if a value of this type can be converted to the specified Postgres Type. Read more
Converts the value of self into the binary format of the specified Postgres Type, appending it to out. Read more
An adaptor method used internally by Rust-Postgres. Read more
Specify the encode format
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.
Returns the additive identity element of Self, 0. Read more
Returns true if self is equal to the additive identity.
Sets self to the additive identity element of Self, 0.
Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler. Read more

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
Returns a reference to self as a ToSql trait object.

Returns the argument unchanged.

See the trait documentation

Calls U::from(self).

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

Convert self to an expression for Diesel’s query builder. Read more
Convert &self to an expression for Diesel’s query builder. Read more
Convert self to an expression for Diesel’s query builder. Read more
Convert &self to an expression for Diesel’s query builder. Read more
Should always be Self
Immutably borrows from an owned value. See Borrow::borrow Read more
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.