PartialDiv in typenum::type_operators - Rust
Description: Division as a partial function. This type operator performs division just as `Div`, but is only defined when the result is an integer (i.e. there is no remainder).
Keywords: rust, rustlang, rust-lang, PartialDiv

# Trait typenum::type_operators::PartialDiv

source ·

    pub trait PartialDiv<Rhs = Self> {
        type Output;

        fn partial_div(self, _: Rhs) -> Self::Output;
    }

Expand description

Division as a partial function. This type operator performs division just as `Div`, but is only defined when the result is an integer (i.e. there is no remainder).

## Required Associated Types§

source

#### type Output

The type of the result of the division

## Required Methods§

source

#### fn partial_div(self, _: Rhs) -> Self::Output

Method for performing the division

## Implementors§

source§

### impl<M, N> PartialDiv<N> for Mwhere
M: Integer + Div<N> + Rem<N, Output = Z0>,

§

#### type Output = <M as Div<N>>::Output

source§

### impl<Rhs> PartialDiv<Rhs> for ATerm

§

#### type Output = ATerm

source§

### impl<Ul: Unsigned, Bl: Bit, Ur: Unsigned, Br: Bit> PartialDiv<UInt<Ur, Br>> for UInt<Ul, Bl>where
UInt<Ul, Bl>: Div<UInt<Ur, Br>> + Rem<UInt<Ur, Br>, Output = U0>,

§

#### type Output = <UInt<Ul, Bl> as Div<UInt<Ur, Br>>>::Output

source§

### impl<Ur: Unsigned, Br: Bit> PartialDiv<UInt<Ur, Br>> for UTerm

§

#### type Output = UTerm

source§

### impl<V, A, Rhs> PartialDiv<Rhs> for TArr<V, A>where
V: PartialDiv<Rhs>,
A: PartialDiv<Rhs>,
Rhs: Copy,

§

#### type Output = TArr<<V as PartialDiv<Rhs>>::Output, <A as PartialDiv<Rhs>>::Output>