Trait sc_network::multiaddr::multihash::typenum::Gcd [−]
pub trait Gcd<Rhs> { type Output; }
Expand description
A type operator that computes the greatest common divisor of Self
and Rhs
.
Example
use typenum::{Gcd, U12, U8, Unsigned}; assert_eq!(<U12 as Gcd<U8>>::Output::to_i32(), 4);
Associated Types
type Output
type Output
The greatest common divisor.
Implementors
impl<U1, U2> Gcd<NInt<U2>> for NInt<U1> where
U1: Unsigned + NonZero + Gcd<U2>,
U2: Unsigned + NonZero,
<U1 as Gcd<U2>>::Output: Unsigned,
<U1 as Gcd<U2>>::Output: NonZero,
impl<U1, U2> Gcd<NInt<U2>> for PInt<U1> where
U1: Unsigned + NonZero + Gcd<U2>,
U2: Unsigned + NonZero,
<U1 as Gcd<U2>>::Output: Unsigned,
<U1 as Gcd<U2>>::Output: NonZero,
impl<U1, U2> Gcd<PInt<U2>> for NInt<U1> where
U1: Unsigned + NonZero + Gcd<U2>,
U2: Unsigned + NonZero,
<U1 as Gcd<U2>>::Output: Unsigned,
<U1 as Gcd<U2>>::Output: NonZero,
impl<U1, U2> Gcd<PInt<U2>> for PInt<U1> where
U1: Unsigned + NonZero + Gcd<U2>,
U2: Unsigned + NonZero,
<U1 as Gcd<U2>>::Output: Unsigned,
<U1 as Gcd<U2>>::Output: NonZero,
impl<Xp, Yp> Gcd<UInt<Yp, B0>> for UInt<Xp, B0> where
Xp: Gcd<Yp>,
UInt<Xp, B0>: NonZero,
UInt<Yp, B0>: NonZero,
impl<Xp, Yp> Gcd<UInt<Yp, B1>> for UInt<Xp, B1> where
UInt<Xp, B1>: Max<UInt<Yp, B1>>,
UInt<Xp, B1>: Min<UInt<Yp, B1>>,
UInt<Yp, B1>: Max<UInt<Xp, B1>>,
UInt<Yp, B1>: Min<UInt<Xp, B1>>,
<UInt<Xp, B1> as Max<UInt<Yp, B1>>>::Output: Sub<<UInt<Xp, B1> as Min<UInt<Yp, B1>>>::Output>,
<<UInt<Xp, B1> as Max<UInt<Yp, B1>>>::Output as Sub<<UInt<Xp, B1> as Min<UInt<Yp, B1>>>::Output>>::Output: Gcd<<UInt<Xp, B1> as Min<UInt<Yp, B1>>>::Output>,