Trait BoundedCastFromInt

pub trait BoundedCastFromInt<T>: Sized

Conversion between integers, wrapping around or saturating at the target type's boundaries.

Required Methods

fn wrapping_cast_from(value: T) -> Self

Converts value to this type, wrapping around at the boundary of the type.

fn saturating_cast_from(value: T) -> Self

Converts value to this type, saturating at the numeric bounds instead of overflowing.

Implementors