ruint

Trait UintTryFrom

Source
pub trait UintTryFrom<T>: Sized { }
Expand description

⚠️ Workaround for Rust issue #50133. Use TryFrom instead.

We cannot implement TryFrom<Uint> for Uint directly, but we can create a new identical trait and implement it there. We can even give this trait a blanket implementation inheriting all TryFrom<_> implementations.

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<const BITS: usize, const LIMBS: usize, T> UintTryFrom<T> for Uint<BITS, LIMBS>
where Self: TryFrom<T, Error = ToUintError<Self>>,

Blanket implementation for any type that implements TryFrom<Uint>.

Source§

impl<const BITS: usize, const LIMBS: usize, const BITS_SRC: usize, const LIMBS_SRC: usize> UintTryFrom<Uint<BITS_SRC, LIMBS_SRC>> for Uint<BITS, LIMBS>