Trait malachite_base::num::conversion::traits::ConvertibleFrom

source ·
pub trait ConvertibleFrom<T> {
    // Required method
    fn convertible_from(value: T) -> bool;
}
Expand description

Tests whether a value of one type is convertible into a value of another.

If ConvertibleFrom<T> for Self is implemented, it usually makes sense to implement TryFrom for T as well.

Required Methods§

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ConvertibleFrom<f32> for i8

source§

fn convertible_from(value: f32) -> bool

Checks whether a value of a floating point type is convertible to a signed type.

An exact conversion is possible if the floating point value is an integer and not too large or too small.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<f32> for i16

source§

fn convertible_from(value: f32) -> bool

Checks whether a value of a floating point type is convertible to a signed type.

An exact conversion is possible if the floating point value is an integer and not too large or too small.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<f32> for i32

source§

fn convertible_from(value: f32) -> bool

Checks whether a value of a floating point type is convertible to a signed type.

An exact conversion is possible if the floating point value is an integer and not too large or too small.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<f32> for i64

source§

fn convertible_from(value: f32) -> bool

Checks whether a value of a floating point type is convertible to a signed type.

An exact conversion is possible if the floating point value is an integer and not too large or too small.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<f32> for i128

source§

fn convertible_from(value: f32) -> bool

Checks whether a value of a floating point type is convertible to a signed type.

An exact conversion is possible if the floating point value is an integer and not too large or too small.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<f32> for isize

source§

fn convertible_from(value: f32) -> bool

Checks whether a value of a floating point type is convertible to a signed type.

An exact conversion is possible if the floating point value is an integer and not too large or too small.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<f32> for u8

source§

fn convertible_from(value: f32) -> bool

Checks whether a value of a floating point type is convertible to an unsigned type.

An exact conversion is possible if the floating point value is an integer, not negative (negative zero is ok), and not too large.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<f32> for u16

source§

fn convertible_from(value: f32) -> bool

Checks whether a value of a floating point type is convertible to an unsigned type.

An exact conversion is possible if the floating point value is an integer, not negative (negative zero is ok), and not too large.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<f32> for u32

source§

fn convertible_from(value: f32) -> bool

Checks whether a value of a floating point type is convertible to an unsigned type.

An exact conversion is possible if the floating point value is an integer, not negative (negative zero is ok), and not too large.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<f32> for u64

source§

fn convertible_from(value: f32) -> bool

Checks whether a value of a floating point type is convertible to an unsigned type.

An exact conversion is possible if the floating point value is an integer, not negative (negative zero is ok), and not too large.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<f32> for u128

source§

fn convertible_from(value: f32) -> bool

Checks whether a value of a floating point type is convertible to an unsigned type.

An exact conversion is possible if the floating point value is an integer, not negative (negative zero is ok), and not too large.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<f32> for usize

source§

fn convertible_from(value: f32) -> bool

Checks whether a value of a floating point type is convertible to an unsigned type.

An exact conversion is possible if the floating point value is an integer, not negative (negative zero is ok), and not too large.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<f64> for i8

source§

fn convertible_from(value: f64) -> bool

Checks whether a value of a floating point type is convertible to a signed type.

An exact conversion is possible if the floating point value is an integer and not too large or too small.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<f64> for i16

source§

fn convertible_from(value: f64) -> bool

Checks whether a value of a floating point type is convertible to a signed type.

An exact conversion is possible if the floating point value is an integer and not too large or too small.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<f64> for i32

source§

fn convertible_from(value: f64) -> bool

Checks whether a value of a floating point type is convertible to a signed type.

An exact conversion is possible if the floating point value is an integer and not too large or too small.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<f64> for i64

source§

fn convertible_from(value: f64) -> bool

Checks whether a value of a floating point type is convertible to a signed type.

An exact conversion is possible if the floating point value is an integer and not too large or too small.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<f64> for i128

source§

fn convertible_from(value: f64) -> bool

Checks whether a value of a floating point type is convertible to a signed type.

An exact conversion is possible if the floating point value is an integer and not too large or too small.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<f64> for isize

source§

fn convertible_from(value: f64) -> bool

Checks whether a value of a floating point type is convertible to a signed type.

An exact conversion is possible if the floating point value is an integer and not too large or too small.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<f64> for u8

source§

fn convertible_from(value: f64) -> bool

Checks whether a value of a floating point type is convertible to an unsigned type.

An exact conversion is possible if the floating point value is an integer, not negative (negative zero is ok), and not too large.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<f64> for u16

source§

fn convertible_from(value: f64) -> bool

Checks whether a value of a floating point type is convertible to an unsigned type.

An exact conversion is possible if the floating point value is an integer, not negative (negative zero is ok), and not too large.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<f64> for u32

source§

fn convertible_from(value: f64) -> bool

Checks whether a value of a floating point type is convertible to an unsigned type.

An exact conversion is possible if the floating point value is an integer, not negative (negative zero is ok), and not too large.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<f64> for u64

source§

fn convertible_from(value: f64) -> bool

Checks whether a value of a floating point type is convertible to an unsigned type.

An exact conversion is possible if the floating point value is an integer, not negative (negative zero is ok), and not too large.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<f64> for u128

source§

fn convertible_from(value: f64) -> bool

Checks whether a value of a floating point type is convertible to an unsigned type.

An exact conversion is possible if the floating point value is an integer, not negative (negative zero is ok), and not too large.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<f64> for usize

source§

fn convertible_from(value: f64) -> bool

Checks whether a value of a floating point type is convertible to an unsigned type.

An exact conversion is possible if the floating point value is an integer, not negative (negative zero is ok), and not too large.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i8> for f32

source§

fn convertible_from(value: i8) -> bool

Checks whether a value of a signed type is convertible to a floating point type.

An exact conversion is possible if the precision of the signed value is not too high.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i8> for f64

source§

fn convertible_from(value: i8) -> bool

Checks whether a value of a signed type is convertible to a floating point type.

An exact conversion is possible if the precision of the signed value is not too high.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i8> for i8

source§

fn convertible_from(_: i8) -> bool

Checks whether a value is convertible to its own type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i8> for i16

source§

fn convertible_from(_: i8) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i8> for i32

source§

fn convertible_from(_: i8) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i8> for i64

source§

fn convertible_from(_: i8) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i8> for i128

source§

fn convertible_from(_: i8) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i8> for isize

source§

fn convertible_from(_: i8) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i8> for u8

source§

fn convertible_from(value: i8) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i8> for u16

source§

fn convertible_from(value: i8) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i8> for u32

source§

fn convertible_from(value: i8) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i8> for u64

source§

fn convertible_from(value: i8) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i8> for u128

source§

fn convertible_from(value: i8) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i8> for usize

source§

fn convertible_from(value: i8) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i16> for f32

source§

fn convertible_from(value: i16) -> bool

Checks whether a value of a signed type is convertible to a floating point type.

An exact conversion is possible if the precision of the signed value is not too high.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i16> for f64

source§

fn convertible_from(value: i16) -> bool

Checks whether a value of a signed type is convertible to a floating point type.

An exact conversion is possible if the precision of the signed value is not too high.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i16> for i8

source§

fn convertible_from(value: i16) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i16> for i16

source§

fn convertible_from(_: i16) -> bool

Checks whether a value is convertible to its own type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i16> for i32

source§

fn convertible_from(_: i16) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i16> for i64

source§

fn convertible_from(_: i16) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i16> for i128

source§

fn convertible_from(_: i16) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i16> for isize

source§

fn convertible_from(_: i16) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i16> for u8

source§

fn convertible_from(value: i16) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i16> for u16

source§

fn convertible_from(value: i16) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i16> for u32

source§

fn convertible_from(value: i16) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i16> for u64

source§

fn convertible_from(value: i16) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i16> for u128

source§

fn convertible_from(value: i16) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i16> for usize

source§

fn convertible_from(value: i16) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i32> for f32

source§

fn convertible_from(value: i32) -> bool

Checks whether a value of a signed type is convertible to a floating point type.

An exact conversion is possible if the precision of the signed value is not too high.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i32> for f64

source§

fn convertible_from(value: i32) -> bool

Checks whether a value of a signed type is convertible to a floating point type.

An exact conversion is possible if the precision of the signed value is not too high.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i32> for i8

source§

fn convertible_from(value: i32) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i32> for i16

source§

fn convertible_from(value: i32) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i32> for i32

source§

fn convertible_from(_: i32) -> bool

Checks whether a value is convertible to its own type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i32> for i64

source§

fn convertible_from(_: i32) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i32> for i128

source§

fn convertible_from(_: i32) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i32> for isize

source§

fn convertible_from(value: i32) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i32> for u8

source§

fn convertible_from(value: i32) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i32> for u16

source§

fn convertible_from(value: i32) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i32> for u32

source§

fn convertible_from(value: i32) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i32> for u64

source§

fn convertible_from(value: i32) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i32> for u128

source§

fn convertible_from(value: i32) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i32> for usize

source§

fn convertible_from(value: i32) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i64> for f32

source§

fn convertible_from(value: i64) -> bool

Checks whether a value of a signed type is convertible to a floating point type.

An exact conversion is possible if the precision of the signed value is not too high.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i64> for f64

source§

fn convertible_from(value: i64) -> bool

Checks whether a value of a signed type is convertible to a floating point type.

An exact conversion is possible if the precision of the signed value is not too high.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i64> for i8

source§

fn convertible_from(value: i64) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i64> for i16

source§

fn convertible_from(value: i64) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i64> for i32

source§

fn convertible_from(value: i64) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i64> for i64

source§

fn convertible_from(_: i64) -> bool

Checks whether a value is convertible to its own type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i64> for i128

source§

fn convertible_from(_: i64) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i64> for isize

source§

fn convertible_from(value: i64) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i64> for u8

source§

fn convertible_from(value: i64) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i64> for u16

source§

fn convertible_from(value: i64) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i64> for u32

source§

fn convertible_from(value: i64) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i64> for u64

source§

fn convertible_from(value: i64) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i64> for u128

source§

fn convertible_from(value: i64) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i64> for usize

source§

fn convertible_from(value: i64) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i128> for f32

source§

fn convertible_from(value: i128) -> bool

Checks whether a value of a signed type is convertible to a floating point type.

An exact conversion is possible if the precision of the signed value is not too high.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i128> for f64

source§

fn convertible_from(value: i128) -> bool

Checks whether a value of a signed type is convertible to a floating point type.

An exact conversion is possible if the precision of the signed value is not too high.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i128> for i8

source§

fn convertible_from(value: i128) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i128> for i16

source§

fn convertible_from(value: i128) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i128> for i32

source§

fn convertible_from(value: i128) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i128> for i64

source§

fn convertible_from(value: i128) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i128> for i128

source§

fn convertible_from(_: i128) -> bool

Checks whether a value is convertible to its own type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i128> for isize

source§

fn convertible_from(value: i128) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i128> for u8

source§

fn convertible_from(value: i128) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i128> for u16

source§

fn convertible_from(value: i128) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i128> for u32

source§

fn convertible_from(value: i128) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i128> for u64

source§

fn convertible_from(value: i128) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i128> for u128

source§

fn convertible_from(value: i128) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<i128> for usize

source§

fn convertible_from(value: i128) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<isize> for f32

source§

fn convertible_from(value: isize) -> bool

Checks whether a value of a signed type is convertible to a floating point type.

An exact conversion is possible if the precision of the signed value is not too high.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<isize> for f64

source§

fn convertible_from(value: isize) -> bool

Checks whether a value of a signed type is convertible to a floating point type.

An exact conversion is possible if the precision of the signed value is not too high.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<isize> for i8

source§

fn convertible_from(value: isize) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<isize> for i16

source§

fn convertible_from(value: isize) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<isize> for i32

source§

fn convertible_from(value: isize) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<isize> for i64

source§

fn convertible_from(value: isize) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<isize> for i128

source§

fn convertible_from(value: isize) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<isize> for isize

source§

fn convertible_from(_: isize) -> bool

Checks whether a value is convertible to its own type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<isize> for u8

source§

fn convertible_from(value: isize) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<isize> for u16

source§

fn convertible_from(value: isize) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<isize> for u32

source§

fn convertible_from(value: isize) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<isize> for u64

source§

fn convertible_from(value: isize) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<isize> for u128

source§

fn convertible_from(value: isize) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<isize> for usize

source§

fn convertible_from(value: isize) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u8> for f32

source§

fn convertible_from(value: u8) -> bool

Checks whether a value of an unsigned type is convertible to a floating point type.

An exact conversion is possible if the unsigned value is not too large to represent (which can only happen when converting a u128 to an f32) and the precision of the unsigned value is not too high.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u8> for f64

source§

fn convertible_from(value: u8) -> bool

Checks whether a value of an unsigned type is convertible to a floating point type.

An exact conversion is possible if the unsigned value is not too large to represent (which can only happen when converting a u128 to an f32) and the precision of the unsigned value is not too high.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u8> for i8

source§

fn convertible_from(value: u8) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u8> for i16

source§

fn convertible_from(_: u8) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u8> for i32

source§

fn convertible_from(_: u8) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u8> for i64

source§

fn convertible_from(_: u8) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u8> for i128

source§

fn convertible_from(_: u8) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u8> for isize

source§

fn convertible_from(_: u8) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u8> for u8

source§

fn convertible_from(_: u8) -> bool

Checks whether a value is convertible to its own type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u8> for u16

source§

fn convertible_from(_: u8) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u8> for u32

source§

fn convertible_from(_: u8) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u8> for u64

source§

fn convertible_from(_: u8) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u8> for u128

source§

fn convertible_from(_: u8) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u8> for usize

source§

fn convertible_from(_: u8) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u16> for f32

source§

fn convertible_from(value: u16) -> bool

Checks whether a value of an unsigned type is convertible to a floating point type.

An exact conversion is possible if the unsigned value is not too large to represent (which can only happen when converting a u128 to an f32) and the precision of the unsigned value is not too high.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u16> for f64

source§

fn convertible_from(value: u16) -> bool

Checks whether a value of an unsigned type is convertible to a floating point type.

An exact conversion is possible if the unsigned value is not too large to represent (which can only happen when converting a u128 to an f32) and the precision of the unsigned value is not too high.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u16> for i8

source§

fn convertible_from(value: u16) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u16> for i16

source§

fn convertible_from(value: u16) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u16> for i32

source§

fn convertible_from(_: u16) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u16> for i64

source§

fn convertible_from(_: u16) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u16> for i128

source§

fn convertible_from(_: u16) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u16> for isize

source§

fn convertible_from(value: u16) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u16> for u8

source§

fn convertible_from(value: u16) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u16> for u16

source§

fn convertible_from(_: u16) -> bool

Checks whether a value is convertible to its own type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u16> for u32

source§

fn convertible_from(_: u16) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u16> for u64

source§

fn convertible_from(_: u16) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u16> for u128

source§

fn convertible_from(_: u16) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u16> for usize

source§

fn convertible_from(_: u16) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u32> for f32

source§

fn convertible_from(value: u32) -> bool

Checks whether a value of an unsigned type is convertible to a floating point type.

An exact conversion is possible if the unsigned value is not too large to represent (which can only happen when converting a u128 to an f32) and the precision of the unsigned value is not too high.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u32> for f64

source§

fn convertible_from(value: u32) -> bool

Checks whether a value of an unsigned type is convertible to a floating point type.

An exact conversion is possible if the unsigned value is not too large to represent (which can only happen when converting a u128 to an f32) and the precision of the unsigned value is not too high.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u32> for i8

source§

fn convertible_from(value: u32) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u32> for i16

source§

fn convertible_from(value: u32) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u32> for i32

source§

fn convertible_from(value: u32) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u32> for i64

source§

fn convertible_from(_: u32) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u32> for i128

source§

fn convertible_from(_: u32) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u32> for isize

source§

fn convertible_from(value: u32) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u32> for u8

source§

fn convertible_from(value: u32) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u32> for u16

source§

fn convertible_from(value: u32) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u32> for u32

source§

fn convertible_from(_: u32) -> bool

Checks whether a value is convertible to its own type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u32> for u64

source§

fn convertible_from(_: u32) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u32> for u128

source§

fn convertible_from(_: u32) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u32> for usize

source§

fn convertible_from(value: u32) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u64> for f32

source§

fn convertible_from(value: u64) -> bool

Checks whether a value of an unsigned type is convertible to a floating point type.

An exact conversion is possible if the unsigned value is not too large to represent (which can only happen when converting a u128 to an f32) and the precision of the unsigned value is not too high.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u64> for f64

source§

fn convertible_from(value: u64) -> bool

Checks whether a value of an unsigned type is convertible to a floating point type.

An exact conversion is possible if the unsigned value is not too large to represent (which can only happen when converting a u128 to an f32) and the precision of the unsigned value is not too high.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u64> for i8

source§

fn convertible_from(value: u64) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u64> for i16

source§

fn convertible_from(value: u64) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u64> for i32

source§

fn convertible_from(value: u64) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u64> for i64

source§

fn convertible_from(value: u64) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u64> for i128

source§

fn convertible_from(_: u64) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u64> for isize

source§

fn convertible_from(value: u64) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u64> for u8

source§

fn convertible_from(value: u64) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u64> for u16

source§

fn convertible_from(value: u64) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u64> for u32

source§

fn convertible_from(value: u64) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u64> for u64

source§

fn convertible_from(_: u64) -> bool

Checks whether a value is convertible to its own type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u64> for u128

source§

fn convertible_from(_: u64) -> bool

Checks whether a value is convertible to a different type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u64> for usize

source§

fn convertible_from(value: u64) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u128> for f32

source§

fn convertible_from(value: u128) -> bool

Checks whether a value of an unsigned type is convertible to a floating point type.

An exact conversion is possible if the unsigned value is not too large to represent (which can only happen when converting a u128 to an f32) and the precision of the unsigned value is not too high.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u128> for f64

source§

fn convertible_from(value: u128) -> bool

Checks whether a value of an unsigned type is convertible to a floating point type.

An exact conversion is possible if the unsigned value is not too large to represent (which can only happen when converting a u128 to an f32) and the precision of the unsigned value is not too high.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u128> for i8

source§

fn convertible_from(value: u128) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u128> for i16

source§

fn convertible_from(value: u128) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u128> for i32

source§

fn convertible_from(value: u128) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u128> for i64

source§

fn convertible_from(value: u128) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u128> for i128

source§

fn convertible_from(value: u128) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u128> for isize

source§

fn convertible_from(value: u128) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u128> for u8

source§

fn convertible_from(value: u128) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u128> for u16

source§

fn convertible_from(value: u128) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u128> for u32

source§

fn convertible_from(value: u128) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u128> for u64

source§

fn convertible_from(value: u128) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u128> for u128

source§

fn convertible_from(_: u128) -> bool

Checks whether a value is convertible to its own type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<u128> for usize

source§

fn convertible_from(value: u128) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<usize> for f32

source§

fn convertible_from(value: usize) -> bool

Checks whether a value of an unsigned type is convertible to a floating point type.

An exact conversion is possible if the unsigned value is not too large to represent (which can only happen when converting a u128 to an f32) and the precision of the unsigned value is not too high.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<usize> for f64

source§

fn convertible_from(value: usize) -> bool

Checks whether a value of an unsigned type is convertible to a floating point type.

An exact conversion is possible if the unsigned value is not too large to represent (which can only happen when converting a u128 to an f32) and the precision of the unsigned value is not too high.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<usize> for i8

source§

fn convertible_from(value: usize) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<usize> for i16

source§

fn convertible_from(value: usize) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<usize> for i32

source§

fn convertible_from(value: usize) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<usize> for i64

source§

fn convertible_from(value: usize) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<usize> for i128

source§

fn convertible_from(value: usize) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<usize> for isize

source§

fn convertible_from(value: usize) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<usize> for u8

source§

fn convertible_from(value: usize) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<usize> for u16

source§

fn convertible_from(value: usize) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<usize> for u32

source§

fn convertible_from(value: usize) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<usize> for u64

source§

fn convertible_from(value: usize) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<usize> for u128

source§

fn convertible_from(value: usize) -> bool

Determines whether a value is convertible to a different type.

Let $W$ be the width of the target type.

If the target type is unsigned then, $$ f_W(n) = (0 \leq n < 2^W). $$

If the target type is signed then, $$ f_W(n) = (-2^{W-1} \leq n < 2^{W-1}-1). $$

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl ConvertibleFrom<usize> for usize

source§

fn convertible_from(_: usize) -> bool

Checks whether a value is convertible to its own type. The result is always true.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Implementors§