[−][src]Trait bigbit::DivRemAssign
Division in place combined with retreiving the remainder.
This serves the same purpose as the DivRem
trait, but the division is performed in place (the variable/field containing the dividend is replaced by the quotient), and the only value returned is the remainder.
Associated Types
type Remainder
The type for the remainder.
Required methods
fn div_rem_assign(&mut self, rhs: Rhs) -> Self::Remainder
Performs combined quotient and remainder calculation, returning the remainder and setting the left operand to the quotient.
Implementors
impl DivRemAssign<u128> for LBNum
[src]
type Remainder = Self
The remainder type.
The reason why this is Self
instead of the type of the divisor is that the remainder as available when the division is finished is still of type LBNum
: it's never converted to the divisor type. As a result, the remainder is returned as-is to avoid situations when the remainder is required to be an LBNum
yet has been converted to the divisor type, which would require converting it back into LBNum
, which would require another allocation and performing the conversion process itself and would also waste the previous buffer.
fn div_rem_assign(&mut self, rhs: u128) -> Self
[src]
impl DivRemAssign<u16> for LBNum
[src]
type Remainder = Self
The remainder type.
The reason why this is Self
instead of the type of the divisor is that the remainder as available when the division is finished is still of type LBNum
: it's never converted to the divisor type. As a result, the remainder is returned as-is to avoid situations when the remainder is required to be an LBNum
yet has been converted to the divisor type, which would require converting it back into LBNum
, which would require another allocation and performing the conversion process itself and would also waste the previous buffer.
fn div_rem_assign(&mut self, rhs: u16) -> Self
[src]
impl DivRemAssign<u32> for LBNum
[src]
type Remainder = Self
The remainder type.
The reason why this is Self
instead of the type of the divisor is that the remainder as available when the division is finished is still of type LBNum
: it's never converted to the divisor type. As a result, the remainder is returned as-is to avoid situations when the remainder is required to be an LBNum
yet has been converted to the divisor type, which would require converting it back into LBNum
, which would require another allocation and performing the conversion process itself and would also waste the previous buffer.
fn div_rem_assign(&mut self, rhs: u32) -> Self
[src]
impl DivRemAssign<u64> for LBNum
[src]
type Remainder = Self
The remainder type.
The reason why this is Self
instead of the type of the divisor is that the remainder as available when the division is finished is still of type LBNum
: it's never converted to the divisor type. As a result, the remainder is returned as-is to avoid situations when the remainder is required to be an LBNum
yet has been converted to the divisor type, which would require converting it back into LBNum
, which would require another allocation and performing the conversion process itself and would also waste the previous buffer.
fn div_rem_assign(&mut self, rhs: u64) -> Self
[src]
impl DivRemAssign<u8> for LBNum
[src]
type Remainder = Self
The remainder type.
The reason why this is Self
instead of the type of the divisor is that the remainder as available when the division is finished is still of type LBNum
: it's never converted to the divisor type. As a result, the remainder is returned as-is to avoid situations when the remainder is required to be an LBNum
yet has been converted to the divisor type, which would require converting it back into LBNum
, which would require another allocation and performing the conversion process itself and would also waste the previous buffer.
fn div_rem_assign(&mut self, rhs: u8) -> Self
[src]
impl DivRemAssign<usize> for LBNum
[src]
type Remainder = Self
The remainder type.
The reason why this is Self
instead of the type of the divisor is that the remainder as available when the division is finished is still of type LBNum
: it's never converted to the divisor type. As a result, the remainder is returned as-is to avoid situations when the remainder is required to be an LBNum
yet has been converted to the divisor type, which would require converting it back into LBNum
, which would require another allocation and performing the conversion process itself and would also waste the previous buffer.
fn div_rem_assign(&mut self, rhs: usize) -> Self
[src]
impl DivRemAssign<LBNum> for LBNum
[src]
type Remainder = Self
fn div_rem_assign(&mut self, rhs: Self) -> Self
[src]
Performs in-place integer division combined with returning the remainder.
Panics
Dividing by 0 triggers an immediate panic.
impl<'_> DivRemAssign<&'_ LBNum> for LBNum
[src]
type Remainder = Self
fn div_rem_assign(&mut self, rhs: &Self) -> Self
[src]
Performs in-place integer division combined with returning the remainder.
Panics
Dividing by 0 triggers an immediate panic.
impl<'_> DivRemAssign<LBNumRef<'_>> for LBNum
[src]
type Remainder = Self
fn div_rem_assign(&mut self, rhs: LBNumRef) -> Self
[src]
Performs in-place integer division combined with returning the remainder.
Panics
Dividing by 0 triggers an immediate panic.