Objects that can be cast to another object in a saturating way.
trait SaturatingCast<T> {
/* Required methods */
fn saturating_cast(self) -> T
}| Receiver | Name | Description |
|---|---|---|
self | saturating_cast |
This is used to cast between integer type so that 256.saturating_cast():u8 == 255.