Function |saturating_to_i8
std/conv::|saturating_to_i8
Usage
|saturating_to_i8<T>(value)
Generics
◻ T:
SaturatingToI8
Parameters
↳ value:
T
Return
↴ i8
Turns data into i8
, saturating if needed.
This function makes a saturating and infaillible conversion to i8
.
If incoming data represents something out of bounds for i8
, then
the resulting value is set to minimum or maximum, depending what is
the closest to truth.