Expand description
Casting.
This modules provides utilities for casting between types.
#[no_std]
compatible.
§64-bit invariant
This module is available on 32-bit arches although panics
will occur between lossy casts, e.g. u64_to_usize
where
the input is larger than u32::MAX
.
On 64-bit arches, all functions are lossless.
Functions§
- i32_
to_ isize - Cast
i32
toisize
. - i64_
to_ isize - Cast
i64
toisize
. - isize_
to_ i64 - Cast
isize
toi64
. - u32_
to_ usize - Cast
u32
tousize
. - u64_
to_ usize - Cast
u64
tousize
. - usize_
to_ u64 - Cast
usize
tou64
.