pub trait ShlRoundAssign<RHS> {
    fn shl_round_assign(&mut self, other: RHS, rm: RoundingMode);
}
Expand description

Left-shifts a number (multiplies it by a power of 2) in place, rounding the result according to a specified rounding mode.

Rounding might only be necessary if other is negative.

Required Methods

Implementations on Foreign Types

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

Examples

See here.

Implementors