Trait malachite_base::num::conversion::traits::ConvertibleFrom
source · [−]pub trait ConvertibleFrom<T> {
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
CheckedFrom
for T
as well.
Required Methods
fn convertible_from(value: T) -> bool
Implementations on Foreign Types
sourceimpl ConvertibleFrom<u8> for u8
impl ConvertibleFrom<u8> for u8
sourcefn convertible_from(_: u8) -> bool
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.
sourceimpl ConvertibleFrom<u16> for u16
impl ConvertibleFrom<u16> for u16
sourcefn convertible_from(_: u16) -> bool
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.
sourceimpl ConvertibleFrom<u32> for u32
impl ConvertibleFrom<u32> for u32
sourcefn convertible_from(_: u32) -> bool
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.
sourceimpl ConvertibleFrom<u64> for u64
impl ConvertibleFrom<u64> for u64
sourcefn convertible_from(_: u64) -> bool
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.
sourceimpl ConvertibleFrom<u128> for u128
impl ConvertibleFrom<u128> for u128
sourcefn convertible_from(_: u128) -> bool
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.
sourceimpl ConvertibleFrom<usize> for usize
impl ConvertibleFrom<usize> for usize
sourcefn convertible_from(_: usize) -> bool
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.
sourceimpl ConvertibleFrom<i8> for i8
impl ConvertibleFrom<i8> for i8
sourcefn convertible_from(_: i8) -> bool
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.
sourceimpl ConvertibleFrom<i16> for i16
impl ConvertibleFrom<i16> for i16
sourcefn convertible_from(_: i16) -> bool
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.
sourceimpl ConvertibleFrom<i32> for i32
impl ConvertibleFrom<i32> for i32
sourcefn convertible_from(_: i32) -> bool
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.
sourceimpl ConvertibleFrom<i64> for i64
impl ConvertibleFrom<i64> for i64
sourcefn convertible_from(_: i64) -> bool
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.
sourceimpl ConvertibleFrom<i128> for i128
impl ConvertibleFrom<i128> for i128
sourcefn convertible_from(_: i128) -> bool
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.
sourceimpl ConvertibleFrom<isize> for isize
impl ConvertibleFrom<isize> for isize
sourcefn convertible_from(_: isize) -> bool
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.
sourceimpl ConvertibleFrom<u8> for u16
impl ConvertibleFrom<u8> for u16
sourcefn convertible_from(_: u8) -> bool
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.
sourceimpl ConvertibleFrom<u16> for u8
impl ConvertibleFrom<u16> for u8
sourcefn convertible_from(value: u16) -> bool
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.
sourceimpl ConvertibleFrom<u8> for u32
impl ConvertibleFrom<u8> for u32
sourcefn convertible_from(_: u8) -> bool
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.
sourceimpl ConvertibleFrom<u32> for u8
impl ConvertibleFrom<u32> for u8
sourcefn convertible_from(value: u32) -> bool
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.
sourceimpl ConvertibleFrom<u8> for u64
impl ConvertibleFrom<u8> for u64
sourcefn convertible_from(_: u8) -> bool
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.
sourceimpl ConvertibleFrom<u64> for u8
impl ConvertibleFrom<u64> for u8
sourcefn convertible_from(value: u64) -> bool
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.
sourceimpl ConvertibleFrom<u8> for u128
impl ConvertibleFrom<u8> for u128
sourcefn convertible_from(_: u8) -> bool
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.
sourceimpl ConvertibleFrom<u128> for u8
impl ConvertibleFrom<u128> for u8
sourcefn convertible_from(value: u128) -> bool
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.
sourceimpl ConvertibleFrom<u8> for usize
impl ConvertibleFrom<u8> for usize
sourcefn convertible_from(_: u8) -> bool
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.
sourceimpl ConvertibleFrom<usize> for u8
impl ConvertibleFrom<usize> for u8
sourcefn convertible_from(value: usize) -> bool
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.
sourceimpl ConvertibleFrom<u8> for i16
impl ConvertibleFrom<u8> for i16
sourcefn convertible_from(_: u8) -> bool
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.
sourceimpl ConvertibleFrom<i16> for u8
impl ConvertibleFrom<i16> for u8
sourcefn convertible_from(value: i16) -> bool
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.
sourceimpl ConvertibleFrom<u8> for i32
impl ConvertibleFrom<u8> for i32
sourcefn convertible_from(_: u8) -> bool
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.
sourceimpl ConvertibleFrom<i32> for u8
impl ConvertibleFrom<i32> for u8
sourcefn convertible_from(value: i32) -> bool
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.
sourceimpl ConvertibleFrom<u8> for i64
impl ConvertibleFrom<u8> for i64
sourcefn convertible_from(_: u8) -> bool
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.
sourceimpl ConvertibleFrom<i64> for u8
impl ConvertibleFrom<i64> for u8
sourcefn convertible_from(value: i64) -> bool
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.
sourceimpl ConvertibleFrom<u8> for i128
impl ConvertibleFrom<u8> for i128
sourcefn convertible_from(_: u8) -> bool
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.
sourceimpl ConvertibleFrom<i128> for u8
impl ConvertibleFrom<i128> for u8
sourcefn convertible_from(value: i128) -> bool
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.
sourceimpl ConvertibleFrom<u8> for isize
impl ConvertibleFrom<u8> for isize
sourcefn convertible_from(_: u8) -> bool
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.
sourceimpl ConvertibleFrom<isize> for u8
impl ConvertibleFrom<isize> for u8
sourcefn convertible_from(value: isize) -> bool
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.
sourceimpl ConvertibleFrom<u16> for u32
impl ConvertibleFrom<u16> for u32
sourcefn convertible_from(_: u16) -> bool
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.
sourceimpl ConvertibleFrom<u32> for u16
impl ConvertibleFrom<u32> for u16
sourcefn convertible_from(value: u32) -> bool
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.
sourceimpl ConvertibleFrom<u16> for u64
impl ConvertibleFrom<u16> for u64
sourcefn convertible_from(_: u16) -> bool
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.
sourceimpl ConvertibleFrom<u64> for u16
impl ConvertibleFrom<u64> for u16
sourcefn convertible_from(value: u64) -> bool
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.
sourceimpl ConvertibleFrom<u16> for u128
impl ConvertibleFrom<u16> for u128
sourcefn convertible_from(_: u16) -> bool
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.
sourceimpl ConvertibleFrom<u128> for u16
impl ConvertibleFrom<u128> for u16
sourcefn convertible_from(value: u128) -> bool
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.
sourceimpl ConvertibleFrom<u16> for usize
impl ConvertibleFrom<u16> for usize
sourcefn convertible_from(_: u16) -> bool
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.
sourceimpl ConvertibleFrom<usize> for u16
impl ConvertibleFrom<usize> for u16
sourcefn convertible_from(value: usize) -> bool
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.
sourceimpl ConvertibleFrom<u16> for i32
impl ConvertibleFrom<u16> for i32
sourcefn convertible_from(_: u16) -> bool
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.
sourceimpl ConvertibleFrom<i32> for u16
impl ConvertibleFrom<i32> for u16
sourcefn convertible_from(value: i32) -> bool
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.
sourceimpl ConvertibleFrom<u16> for i64
impl ConvertibleFrom<u16> for i64
sourcefn convertible_from(_: u16) -> bool
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.
sourceimpl ConvertibleFrom<i64> for u16
impl ConvertibleFrom<i64> for u16
sourcefn convertible_from(value: i64) -> bool
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.
sourceimpl ConvertibleFrom<u16> for i128
impl ConvertibleFrom<u16> for i128
sourcefn convertible_from(_: u16) -> bool
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.
sourceimpl ConvertibleFrom<i128> for u16
impl ConvertibleFrom<i128> for u16
sourcefn convertible_from(value: i128) -> bool
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.
sourceimpl ConvertibleFrom<u32> for u64
impl ConvertibleFrom<u32> for u64
sourcefn convertible_from(_: u32) -> bool
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.
sourceimpl ConvertibleFrom<u64> for u32
impl ConvertibleFrom<u64> for u32
sourcefn convertible_from(value: u64) -> bool
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.
sourceimpl ConvertibleFrom<u32> for u128
impl ConvertibleFrom<u32> for u128
sourcefn convertible_from(_: u32) -> bool
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.
sourceimpl ConvertibleFrom<u128> for u32
impl ConvertibleFrom<u128> for u32
sourcefn convertible_from(value: u128) -> bool
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.
sourceimpl ConvertibleFrom<u32> for i64
impl ConvertibleFrom<u32> for i64
sourcefn convertible_from(_: u32) -> bool
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.
sourceimpl ConvertibleFrom<i64> for u32
impl ConvertibleFrom<i64> for u32
sourcefn convertible_from(value: i64) -> bool
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.
sourceimpl ConvertibleFrom<u32> for i128
impl ConvertibleFrom<u32> for i128
sourcefn convertible_from(_: u32) -> bool
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.
sourceimpl ConvertibleFrom<i128> for u32
impl ConvertibleFrom<i128> for u32
sourcefn convertible_from(value: i128) -> bool
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.
sourceimpl ConvertibleFrom<u64> for u128
impl ConvertibleFrom<u64> for u128
sourcefn convertible_from(_: u64) -> bool
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.
sourceimpl ConvertibleFrom<u128> for u64
impl ConvertibleFrom<u128> for u64
sourcefn convertible_from(value: u128) -> bool
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.
sourceimpl ConvertibleFrom<u64> for i128
impl ConvertibleFrom<u64> for i128
sourcefn convertible_from(_: u64) -> bool
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.
sourceimpl ConvertibleFrom<i128> for u64
impl ConvertibleFrom<i128> for u64
sourcefn convertible_from(value: i128) -> bool
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.
sourceimpl ConvertibleFrom<i8> for i16
impl ConvertibleFrom<i8> for i16
sourcefn convertible_from(_: i8) -> bool
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.
sourceimpl ConvertibleFrom<i16> for i8
impl ConvertibleFrom<i16> for i8
sourcefn convertible_from(value: i16) -> bool
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.
sourceimpl ConvertibleFrom<i8> for i32
impl ConvertibleFrom<i8> for i32
sourcefn convertible_from(_: i8) -> bool
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.
sourceimpl ConvertibleFrom<i32> for i8
impl ConvertibleFrom<i32> for i8
sourcefn convertible_from(value: i32) -> bool
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.
sourceimpl ConvertibleFrom<i8> for i64
impl ConvertibleFrom<i8> for i64
sourcefn convertible_from(_: i8) -> bool
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.
sourceimpl ConvertibleFrom<i64> for i8
impl ConvertibleFrom<i64> for i8
sourcefn convertible_from(value: i64) -> bool
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.
sourceimpl ConvertibleFrom<i8> for i128
impl ConvertibleFrom<i8> for i128
sourcefn convertible_from(_: i8) -> bool
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.
sourceimpl ConvertibleFrom<i128> for i8
impl ConvertibleFrom<i128> for i8
sourcefn convertible_from(value: i128) -> bool
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.
sourceimpl ConvertibleFrom<i8> for isize
impl ConvertibleFrom<i8> for isize
sourcefn convertible_from(_: i8) -> bool
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.
sourceimpl ConvertibleFrom<isize> for i8
impl ConvertibleFrom<isize> for i8
sourcefn convertible_from(value: isize) -> bool
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.
sourceimpl ConvertibleFrom<i16> for i32
impl ConvertibleFrom<i16> for i32
sourcefn convertible_from(_: i16) -> bool
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.
sourceimpl ConvertibleFrom<i32> for i16
impl ConvertibleFrom<i32> for i16
sourcefn convertible_from(value: i32) -> bool
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.
sourceimpl ConvertibleFrom<i16> for i64
impl ConvertibleFrom<i16> for i64
sourcefn convertible_from(_: i16) -> bool
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.
sourceimpl ConvertibleFrom<i64> for i16
impl ConvertibleFrom<i64> for i16
sourcefn convertible_from(value: i64) -> bool
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.
sourceimpl ConvertibleFrom<i16> for i128
impl ConvertibleFrom<i16> for i128
sourcefn convertible_from(_: i16) -> bool
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.
sourceimpl ConvertibleFrom<i128> for i16
impl ConvertibleFrom<i128> for i16
sourcefn convertible_from(value: i128) -> bool
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.
sourceimpl ConvertibleFrom<i16> for isize
impl ConvertibleFrom<i16> for isize
sourcefn convertible_from(_: i16) -> bool
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.
sourceimpl ConvertibleFrom<isize> for i16
impl ConvertibleFrom<isize> for i16
sourcefn convertible_from(value: isize) -> bool
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.
sourceimpl ConvertibleFrom<i32> for i64
impl ConvertibleFrom<i32> for i64
sourcefn convertible_from(_: i32) -> bool
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.
sourceimpl ConvertibleFrom<i64> for i32
impl ConvertibleFrom<i64> for i32
sourcefn convertible_from(value: i64) -> bool
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.
sourceimpl ConvertibleFrom<i32> for i128
impl ConvertibleFrom<i32> for i128
sourcefn convertible_from(_: i32) -> bool
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.
sourceimpl ConvertibleFrom<i128> for i32
impl ConvertibleFrom<i128> for i32
sourcefn convertible_from(value: i128) -> bool
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.
sourceimpl ConvertibleFrom<i64> for i128
impl ConvertibleFrom<i64> for i128
sourcefn convertible_from(_: i64) -> bool
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.
sourceimpl ConvertibleFrom<i128> for i64
impl ConvertibleFrom<i128> for i64
sourcefn convertible_from(value: i128) -> bool
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.
sourceimpl ConvertibleFrom<u8> for i8
impl ConvertibleFrom<u8> for i8
sourcefn convertible_from(value: u8) -> bool
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.
sourceimpl ConvertibleFrom<i8> for u8
impl ConvertibleFrom<i8> for u8
sourcefn convertible_from(value: i8) -> bool
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.
sourceimpl ConvertibleFrom<u16> for i8
impl ConvertibleFrom<u16> for i8
sourcefn convertible_from(value: u16) -> bool
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.
sourceimpl ConvertibleFrom<i8> for u16
impl ConvertibleFrom<i8> for u16
sourcefn convertible_from(value: i8) -> bool
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.
sourceimpl ConvertibleFrom<u16> for i16
impl ConvertibleFrom<u16> for i16
sourcefn convertible_from(value: u16) -> bool
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.
sourceimpl ConvertibleFrom<i16> for u16
impl ConvertibleFrom<i16> for u16
sourcefn convertible_from(value: i16) -> bool
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.
sourceimpl ConvertibleFrom<u16> for isize
impl ConvertibleFrom<u16> for isize
sourcefn convertible_from(value: u16) -> bool
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.
sourceimpl ConvertibleFrom<isize> for u16
impl ConvertibleFrom<isize> for u16
sourcefn convertible_from(value: isize) -> bool
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.
sourceimpl ConvertibleFrom<u32> for usize
impl ConvertibleFrom<u32> for usize
sourcefn convertible_from(value: u32) -> bool
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.
sourceimpl ConvertibleFrom<usize> for u32
impl ConvertibleFrom<usize> for u32
sourcefn convertible_from(value: usize) -> bool
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.
sourceimpl ConvertibleFrom<u32> for i8
impl ConvertibleFrom<u32> for i8
sourcefn convertible_from(value: u32) -> bool
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.
sourceimpl ConvertibleFrom<i8> for u32
impl ConvertibleFrom<i8> for u32
sourcefn convertible_from(value: i8) -> bool
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.
sourceimpl ConvertibleFrom<u32> for i16
impl ConvertibleFrom<u32> for i16
sourcefn convertible_from(value: u32) -> bool
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.
sourceimpl ConvertibleFrom<i16> for u32
impl ConvertibleFrom<i16> for u32
sourcefn convertible_from(value: i16) -> bool
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.
sourceimpl ConvertibleFrom<u32> for i32
impl ConvertibleFrom<u32> for i32
sourcefn convertible_from(value: u32) -> bool
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.
sourceimpl ConvertibleFrom<i32> for u32
impl ConvertibleFrom<i32> for u32
sourcefn convertible_from(value: i32) -> bool
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.
sourceimpl ConvertibleFrom<u32> for isize
impl ConvertibleFrom<u32> for isize
sourcefn convertible_from(value: u32) -> bool
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.
sourceimpl ConvertibleFrom<isize> for u32
impl ConvertibleFrom<isize> for u32
sourcefn convertible_from(value: isize) -> bool
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.
sourceimpl ConvertibleFrom<u64> for usize
impl ConvertibleFrom<u64> for usize
sourcefn convertible_from(value: u64) -> bool
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.
sourceimpl ConvertibleFrom<usize> for u64
impl ConvertibleFrom<usize> for u64
sourcefn convertible_from(value: usize) -> bool
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.
sourceimpl ConvertibleFrom<u64> for i8
impl ConvertibleFrom<u64> for i8
sourcefn convertible_from(value: u64) -> bool
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.
sourceimpl ConvertibleFrom<i8> for u64
impl ConvertibleFrom<i8> for u64
sourcefn convertible_from(value: i8) -> bool
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.
sourceimpl ConvertibleFrom<u64> for i16
impl ConvertibleFrom<u64> for i16
sourcefn convertible_from(value: u64) -> bool
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.
sourceimpl ConvertibleFrom<i16> for u64
impl ConvertibleFrom<i16> for u64
sourcefn convertible_from(value: i16) -> bool
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.
sourceimpl ConvertibleFrom<u64> for i32
impl ConvertibleFrom<u64> for i32
sourcefn convertible_from(value: u64) -> bool
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.
sourceimpl ConvertibleFrom<i32> for u64
impl ConvertibleFrom<i32> for u64
sourcefn convertible_from(value: i32) -> bool
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.
sourceimpl ConvertibleFrom<u64> for i64
impl ConvertibleFrom<u64> for i64
sourcefn convertible_from(value: u64) -> bool
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.
sourceimpl ConvertibleFrom<i64> for u64
impl ConvertibleFrom<i64> for u64
sourcefn convertible_from(value: i64) -> bool
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.
sourceimpl ConvertibleFrom<u64> for isize
impl ConvertibleFrom<u64> for isize
sourcefn convertible_from(value: u64) -> bool
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.
sourceimpl ConvertibleFrom<isize> for u64
impl ConvertibleFrom<isize> for u64
sourcefn convertible_from(value: isize) -> bool
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.
sourceimpl ConvertibleFrom<u128> for usize
impl ConvertibleFrom<u128> for usize
sourcefn convertible_from(value: u128) -> bool
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.
sourceimpl ConvertibleFrom<usize> for u128
impl ConvertibleFrom<usize> for u128
sourcefn convertible_from(value: usize) -> bool
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.
sourceimpl ConvertibleFrom<u128> for i8
impl ConvertibleFrom<u128> for i8
sourcefn convertible_from(value: u128) -> bool
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.
sourceimpl ConvertibleFrom<i8> for u128
impl ConvertibleFrom<i8> for u128
sourcefn convertible_from(value: i8) -> bool
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.
sourceimpl ConvertibleFrom<u128> for i16
impl ConvertibleFrom<u128> for i16
sourcefn convertible_from(value: u128) -> bool
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.
sourceimpl ConvertibleFrom<i16> for u128
impl ConvertibleFrom<i16> for u128
sourcefn convertible_from(value: i16) -> bool
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.
sourceimpl ConvertibleFrom<u128> for i32
impl ConvertibleFrom<u128> for i32
sourcefn convertible_from(value: u128) -> bool
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.
sourceimpl ConvertibleFrom<i32> for u128
impl ConvertibleFrom<i32> for u128
sourcefn convertible_from(value: i32) -> bool
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.
sourceimpl ConvertibleFrom<u128> for i64
impl ConvertibleFrom<u128> for i64
sourcefn convertible_from(value: u128) -> bool
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.
sourceimpl ConvertibleFrom<i64> for u128
impl ConvertibleFrom<i64> for u128
sourcefn convertible_from(value: i64) -> bool
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.
sourceimpl ConvertibleFrom<u128> for i128
impl ConvertibleFrom<u128> for i128
sourcefn convertible_from(value: u128) -> bool
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.
sourceimpl ConvertibleFrom<i128> for u128
impl ConvertibleFrom<i128> for u128
sourcefn convertible_from(value: i128) -> bool
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.
sourceimpl ConvertibleFrom<u128> for isize
impl ConvertibleFrom<u128> for isize
sourcefn convertible_from(value: u128) -> bool
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.
sourceimpl ConvertibleFrom<isize> for u128
impl ConvertibleFrom<isize> for u128
sourcefn convertible_from(value: isize) -> bool
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.
sourceimpl ConvertibleFrom<usize> for i8
impl ConvertibleFrom<usize> for i8
sourcefn convertible_from(value: usize) -> bool
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.
sourceimpl ConvertibleFrom<i8> for usize
impl ConvertibleFrom<i8> for usize
sourcefn convertible_from(value: i8) -> bool
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.
sourceimpl ConvertibleFrom<usize> for i16
impl ConvertibleFrom<usize> for i16
sourcefn convertible_from(value: usize) -> bool
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.
sourceimpl ConvertibleFrom<i16> for usize
impl ConvertibleFrom<i16> for usize
sourcefn convertible_from(value: i16) -> bool
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.
sourceimpl ConvertibleFrom<usize> for i32
impl ConvertibleFrom<usize> for i32
sourcefn convertible_from(value: usize) -> bool
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.
sourceimpl ConvertibleFrom<i32> for usize
impl ConvertibleFrom<i32> for usize
sourcefn convertible_from(value: i32) -> bool
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.
sourceimpl ConvertibleFrom<usize> for i64
impl ConvertibleFrom<usize> for i64
sourcefn convertible_from(value: usize) -> bool
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.
sourceimpl ConvertibleFrom<i64> for usize
impl ConvertibleFrom<i64> for usize
sourcefn convertible_from(value: i64) -> bool
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.
sourceimpl ConvertibleFrom<usize> for i128
impl ConvertibleFrom<usize> for i128
sourcefn convertible_from(value: usize) -> bool
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.
sourceimpl ConvertibleFrom<i128> for usize
impl ConvertibleFrom<i128> for usize
sourcefn convertible_from(value: i128) -> bool
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.
sourceimpl ConvertibleFrom<usize> for isize
impl ConvertibleFrom<usize> for isize
sourcefn convertible_from(value: usize) -> bool
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.
sourceimpl ConvertibleFrom<isize> for usize
impl ConvertibleFrom<isize> for usize
sourcefn convertible_from(value: isize) -> bool
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.
sourceimpl ConvertibleFrom<i32> for isize
impl ConvertibleFrom<i32> for isize
sourcefn convertible_from(value: i32) -> bool
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.
sourceimpl ConvertibleFrom<isize> for i32
impl ConvertibleFrom<isize> for i32
sourcefn convertible_from(value: isize) -> bool
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.
sourceimpl ConvertibleFrom<i64> for isize
impl ConvertibleFrom<i64> for isize
sourcefn convertible_from(value: i64) -> bool
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.
sourceimpl ConvertibleFrom<isize> for i64
impl ConvertibleFrom<isize> for i64
sourcefn convertible_from(value: isize) -> bool
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.
sourceimpl ConvertibleFrom<i128> for isize
impl ConvertibleFrom<i128> for isize
sourcefn convertible_from(value: i128) -> bool
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.
sourceimpl ConvertibleFrom<isize> for i128
impl ConvertibleFrom<isize> for i128
sourcefn convertible_from(value: isize) -> bool
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.
sourceimpl ConvertibleFrom<u8> for f32
impl ConvertibleFrom<u8> for f32
sourcefn convertible_from(value: u8) -> bool
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.
sourceimpl ConvertibleFrom<f32> for u8
impl ConvertibleFrom<f32> for u8
sourcefn convertible_from(value: f32) -> bool
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.
sourceimpl ConvertibleFrom<u8> for f64
impl ConvertibleFrom<u8> for f64
sourcefn convertible_from(value: u8) -> bool
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.
sourceimpl ConvertibleFrom<f64> for u8
impl ConvertibleFrom<f64> for u8
sourcefn convertible_from(value: f64) -> bool
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.
sourceimpl ConvertibleFrom<u16> for f32
impl ConvertibleFrom<u16> for f32
sourcefn convertible_from(value: u16) -> bool
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.
sourceimpl ConvertibleFrom<f32> for u16
impl ConvertibleFrom<f32> for u16
sourcefn convertible_from(value: f32) -> bool
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.
sourceimpl ConvertibleFrom<u16> for f64
impl ConvertibleFrom<u16> for f64
sourcefn convertible_from(value: u16) -> bool
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.
sourceimpl ConvertibleFrom<f64> for u16
impl ConvertibleFrom<f64> for u16
sourcefn convertible_from(value: f64) -> bool
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.
sourceimpl ConvertibleFrom<u32> for f32
impl ConvertibleFrom<u32> for f32
sourcefn convertible_from(value: u32) -> bool
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.
sourceimpl ConvertibleFrom<f32> for u32
impl ConvertibleFrom<f32> for u32
sourcefn convertible_from(value: f32) -> bool
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.
sourceimpl ConvertibleFrom<u32> for f64
impl ConvertibleFrom<u32> for f64
sourcefn convertible_from(value: u32) -> bool
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.
sourceimpl ConvertibleFrom<f64> for u32
impl ConvertibleFrom<f64> for u32
sourcefn convertible_from(value: f64) -> bool
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.
sourceimpl ConvertibleFrom<u64> for f32
impl ConvertibleFrom<u64> for f32
sourcefn convertible_from(value: u64) -> bool
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.
sourceimpl ConvertibleFrom<f32> for u64
impl ConvertibleFrom<f32> for u64
sourcefn convertible_from(value: f32) -> bool
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.
sourceimpl ConvertibleFrom<u64> for f64
impl ConvertibleFrom<u64> for f64
sourcefn convertible_from(value: u64) -> bool
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.
sourceimpl ConvertibleFrom<f64> for u64
impl ConvertibleFrom<f64> for u64
sourcefn convertible_from(value: f64) -> bool
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.
sourceimpl ConvertibleFrom<u128> for f32
impl ConvertibleFrom<u128> for f32
sourcefn convertible_from(value: u128) -> bool
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.
sourceimpl ConvertibleFrom<f32> for u128
impl ConvertibleFrom<f32> for u128
sourcefn convertible_from(value: f32) -> bool
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.
sourceimpl ConvertibleFrom<u128> for f64
impl ConvertibleFrom<u128> for f64
sourcefn convertible_from(value: u128) -> bool
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.
sourceimpl ConvertibleFrom<f64> for u128
impl ConvertibleFrom<f64> for u128
sourcefn convertible_from(value: f64) -> bool
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.
sourceimpl ConvertibleFrom<usize> for f32
impl ConvertibleFrom<usize> for f32
sourcefn convertible_from(value: usize) -> bool
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.
sourceimpl ConvertibleFrom<f32> for usize
impl ConvertibleFrom<f32> for usize
sourcefn convertible_from(value: f32) -> bool
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.
sourceimpl ConvertibleFrom<usize> for f64
impl ConvertibleFrom<usize> for f64
sourcefn convertible_from(value: usize) -> bool
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.
sourceimpl ConvertibleFrom<f64> for usize
impl ConvertibleFrom<f64> for usize
sourcefn convertible_from(value: f64) -> bool
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.
sourceimpl ConvertibleFrom<i8> for f32
impl ConvertibleFrom<i8> for f32
sourcefn convertible_from(value: i8) -> bool
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.
sourceimpl ConvertibleFrom<f32> for i8
impl ConvertibleFrom<f32> for i8
sourcefn convertible_from(value: f32) -> bool
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.
sourceimpl ConvertibleFrom<i8> for f64
impl ConvertibleFrom<i8> for f64
sourcefn convertible_from(value: i8) -> bool
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.
sourceimpl ConvertibleFrom<f64> for i8
impl ConvertibleFrom<f64> for i8
sourcefn convertible_from(value: f64) -> bool
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.
sourceimpl ConvertibleFrom<i16> for f32
impl ConvertibleFrom<i16> for f32
sourcefn convertible_from(value: i16) -> bool
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.
sourceimpl ConvertibleFrom<f32> for i16
impl ConvertibleFrom<f32> for i16
sourcefn convertible_from(value: f32) -> bool
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.
sourceimpl ConvertibleFrom<i16> for f64
impl ConvertibleFrom<i16> for f64
sourcefn convertible_from(value: i16) -> bool
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.
sourceimpl ConvertibleFrom<f64> for i16
impl ConvertibleFrom<f64> for i16
sourcefn convertible_from(value: f64) -> bool
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.
sourceimpl ConvertibleFrom<i32> for f32
impl ConvertibleFrom<i32> for f32
sourcefn convertible_from(value: i32) -> bool
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.
sourceimpl ConvertibleFrom<f32> for i32
impl ConvertibleFrom<f32> for i32
sourcefn convertible_from(value: f32) -> bool
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.
sourceimpl ConvertibleFrom<i32> for f64
impl ConvertibleFrom<i32> for f64
sourcefn convertible_from(value: i32) -> bool
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.
sourceimpl ConvertibleFrom<f64> for i32
impl ConvertibleFrom<f64> for i32
sourcefn convertible_from(value: f64) -> bool
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.
sourceimpl ConvertibleFrom<i64> for f32
impl ConvertibleFrom<i64> for f32
sourcefn convertible_from(value: i64) -> bool
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.
sourceimpl ConvertibleFrom<f32> for i64
impl ConvertibleFrom<f32> for i64
sourcefn convertible_from(value: f32) -> bool
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.
sourceimpl ConvertibleFrom<i64> for f64
impl ConvertibleFrom<i64> for f64
sourcefn convertible_from(value: i64) -> bool
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.
sourceimpl ConvertibleFrom<f64> for i64
impl ConvertibleFrom<f64> for i64
sourcefn convertible_from(value: f64) -> bool
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.
sourceimpl ConvertibleFrom<i128> for f32
impl ConvertibleFrom<i128> for f32
sourcefn convertible_from(value: i128) -> bool
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.
sourceimpl ConvertibleFrom<f32> for i128
impl ConvertibleFrom<f32> for i128
sourcefn convertible_from(value: f32) -> bool
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.
sourceimpl ConvertibleFrom<i128> for f64
impl ConvertibleFrom<i128> for f64
sourcefn convertible_from(value: i128) -> bool
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.
sourceimpl ConvertibleFrom<f64> for i128
impl ConvertibleFrom<f64> for i128
sourcefn convertible_from(value: f64) -> bool
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.
sourceimpl ConvertibleFrom<isize> for f32
impl ConvertibleFrom<isize> for f32
sourcefn convertible_from(value: isize) -> bool
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.
sourceimpl ConvertibleFrom<f32> for isize
impl ConvertibleFrom<f32> for isize
sourcefn convertible_from(value: f32) -> bool
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.
sourceimpl ConvertibleFrom<isize> for f64
impl ConvertibleFrom<isize> for f64
sourcefn convertible_from(value: isize) -> bool
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.
sourceimpl ConvertibleFrom<f64> for isize
impl ConvertibleFrom<f64> for isize
sourcefn convertible_from(value: f64) -> bool
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.