Trait ClampedInto

Source
pub trait ClampedInto<T> {
    // Required method
    fn clamped_into(self) -> T;
}
Expand description

Conversion between types with silent value clamping.

Required Methods§

Source

fn clamped_into(self) -> T

Converts self into T capping values at T’s maximum or minimum boundaries.

Implementations on Foreign Types§

Source§

impl ClampedInto<i16> for i32

Source§

impl ClampedInto<i16> for u16

Source§

impl ClampedInto<u16> for i32

Source§

impl ClampedInto<u16> for u32

Source§

impl ClampedInto<usize> for i16

Implementors§