Conversion between types with silent value clamping.
| 35 | |
| 36 | /// Conversion between types with silent value clamping. |
| 37 | pub trait ClampedInto<T> { |
| 38 | /// Converts self into `T` capping values at `T`'s maximum or minimum boundaries. |
| 39 | fn clamped_into(self) -> T; |
| 40 | } |
| 41 | |
| 42 | impl ClampedInto<usize> for i16 { |
| 43 | fn clamped_into(self) -> usize { |
nothing calls this directly
no outgoing calls
no test coverage detected