The serialization implementation is heavily inspired by the existing trait implentation for `std::num::Wrapping<T>`. The deserializing implementation maps input values that lie outside of the numerical range of the output type to the `MIN` or `MAX` value of the output type, depending on the sign of the input value. This behaviour follows to the `Saturating` semantics of the output type. fix #2708