jiff::util::rangeint

Trait RInto

Source
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§

Source

fn rinto(self) -> T

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.

Implementors§

Source§

impl<T, U> RInto<U> for T
where U: RFrom<T>,