pub(crate) trait RInto<T>: Sized {
// Required method
fn rinto(self) -> T;
}
Expand description
A trait for losslessly converting to ranged integers.
This goes along with RFrom
and exists to make things like t.rinto()
work without the need to do T::rfrom(..)
. Like the standard library
Into
trait, a blanket impl is provided based on impls of RFrom
. Callers
are not expected to implement this trait directly.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.