Trait UintTryFrom
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§
impl<const BITS: usize, const LIMBS: usize, T> UintTryFrom<T> for Uint<BITS, LIMBS>
Blanket implementation for any type that implements TryFrom<Uint>
.
impl<const BITS: usize, const LIMBS: usize, const BITS_SRC: usize, const LIMBS_SRC: usize> UintTryFrom<Signed<BITS_SRC, LIMBS_SRC>> for Signed<BITS, LIMBS>
Conversion between Signed
of different BITS
or LIMBS
length.
impl<const BITS: usize, const LIMBS: usize, const BITS_SRC: usize, const LIMBS_SRC: usize> UintTryFrom<Signed<BITS_SRC, LIMBS_SRC>> for Uint<BITS, LIMBS>
Conversion from positive Signed
to Uint
of different BITS
or LIMBS
length.
impl<const BITS: usize, const LIMBS: usize, const BITS_SRC: usize, const LIMBS_SRC: usize> UintTryFrom<Uint<BITS_SRC, LIMBS_SRC>> for Signed<BITS, LIMBS>
Conversion from Uint
to positive Signed
of different BITS
or LIMBS
length.