[−][src]Trait gstreamer_gl::prelude::MulDiv
Trait for calculating val * num / denom
with different rounding modes and overflow
protection.
Implementations of this trait have to ensure that even if the result of the multiplication does
not fit into the type, as long as it would fit after the division the correct result has to be
returned instead of None
. None
only should be returned if the overall result does not fit
into the type.
This specifically means that e.g. the u64
implementation must, depending on the arguments, be
able to do 128 bit integer multiplication.
Associated Types
type Output
Output type for the methods of this trait.
Required methods
fn mul_div_floor(self, num: RHS, denom: RHS) -> Option<Self::Output>
Calculates floor(val * num / denom)
, i.e. the largest integer less than or equal to the
result of the division.
Example
extern crate muldiv; use muldiv::MulDiv; let x = 3i8.mul_div_floor(4, 2); assert_eq!(x, Some(6)); let x = 5i8.mul_div_floor(2, 3); assert_eq!(x, Some(3)); let x = (-5i8).mul_div_floor(2, 3); assert_eq!(x, Some(-4)); let x = 3i8.mul_div_floor(3, 2); assert_eq!(x, Some(4)); let x = (-3i8).mul_div_floor(3, 2); assert_eq!(x, Some(-5)); let x = 127i8.mul_div_floor(4, 3); assert_eq!(x, None);
fn mul_div_round(self, num: RHS, denom: RHS) -> Option<Self::Output>
Calculates round(val * num / denom)
, i.e. the closest integer to the result of the
division. If both surrounding integers are the same distance (x.5
), the one with the bigger
absolute value is returned (round away from 0.0).
Example
extern crate muldiv; use muldiv::MulDiv; let x = 3i8.mul_div_round(4, 2); assert_eq!(x, Some(6)); let x = 5i8.mul_div_round(2, 3); assert_eq!(x, Some(3)); let x = (-5i8).mul_div_round(2, 3); assert_eq!(x, Some(-3)); let x = 3i8.mul_div_round(3, 2); assert_eq!(x, Some(5)); let x = (-3i8).mul_div_round(3, 2); assert_eq!(x, Some(-5)); let x = 127i8.mul_div_round(4, 3); assert_eq!(x, None);
fn mul_div_ceil(self, num: RHS, denom: RHS) -> Option<Self::Output>
Calculates ceil(val * num / denom)
, i.e. the the smallest integer greater than or equal to
the result of the division.
Example
extern crate muldiv; use muldiv::MulDiv; let x = 3i8.mul_div_ceil(4, 2); assert_eq!(x, Some(6)); let x = 5i8.mul_div_ceil(2, 3); assert_eq!(x, Some(4)); let x = (-5i8).mul_div_ceil(2, 3); assert_eq!(x, Some(-3)); let x = 3i8.mul_div_ceil(3, 2); assert_eq!(x, Some(5)); let x = (-3i8).mul_div_ceil(3, 2); assert_eq!(x, Some(-4)); let x = (127i8).mul_div_ceil(4, 3); assert_eq!(x, None);
Implementations on Foreign Types
impl<'a> MulDiv<&'a u64> for Buffers
[src]
type Output = Buffers
fn mul_div_floor(
self,
num: &u64,
denom: &u64
) -> Option<<Buffers as MulDiv<&'a u64>>::Output>
[src]
self,
num: &u64,
denom: &u64
) -> Option<<Buffers as MulDiv<&'a u64>>::Output>
fn mul_div_round(
self,
num: &u64,
denom: &u64
) -> Option<<Buffers as MulDiv<&'a u64>>::Output>
[src]
self,
num: &u64,
denom: &u64
) -> Option<<Buffers as MulDiv<&'a u64>>::Output>
fn mul_div_ceil(
self,
num: &u64,
denom: &u64
) -> Option<<Buffers as MulDiv<&'a u64>>::Output>
[src]
self,
num: &u64,
denom: &u64
) -> Option<<Buffers as MulDiv<&'a u64>>::Output>
impl<'a> MulDiv<u64> for &'a Bytes
[src]
type Output = Bytes
fn mul_div_floor(
self,
num: u64,
denom: u64
) -> Option<<&'a Bytes as MulDiv<u64>>::Output>
[src]
self,
num: u64,
denom: u64
) -> Option<<&'a Bytes as MulDiv<u64>>::Output>
fn mul_div_round(
self,
num: u64,
denom: u64
) -> Option<<&'a Bytes as MulDiv<u64>>::Output>
[src]
self,
num: u64,
denom: u64
) -> Option<<&'a Bytes as MulDiv<u64>>::Output>
fn mul_div_ceil(
self,
num: u64,
denom: u64
) -> Option<<&'a Bytes as MulDiv<u64>>::Output>
[src]
self,
num: u64,
denom: u64
) -> Option<<&'a Bytes as MulDiv<u64>>::Output>
impl MulDiv<Bytes> for Bytes
[src]
type Output = Bytes
fn mul_div_floor(
self,
num: Bytes,
denom: Bytes
) -> Option<<Bytes as MulDiv<Bytes>>::Output>
[src]
self,
num: Bytes,
denom: Bytes
) -> Option<<Bytes as MulDiv<Bytes>>::Output>
fn mul_div_round(
self,
num: Bytes,
denom: Bytes
) -> Option<<Bytes as MulDiv<Bytes>>::Output>
[src]
self,
num: Bytes,
denom: Bytes
) -> Option<<Bytes as MulDiv<Bytes>>::Output>
fn mul_div_ceil(
self,
num: Bytes,
denom: Bytes
) -> Option<<Bytes as MulDiv<Bytes>>::Output>
[src]
self,
num: Bytes,
denom: Bytes
) -> Option<<Bytes as MulDiv<Bytes>>::Output>
impl<'a> MulDiv<&'a Bytes> for Bytes
[src]
type Output = Bytes
fn mul_div_floor(
self,
num: &Bytes,
denom: &Bytes
) -> Option<<Bytes as MulDiv<&'a Bytes>>::Output>
[src]
self,
num: &Bytes,
denom: &Bytes
) -> Option<<Bytes as MulDiv<&'a Bytes>>::Output>
fn mul_div_round(
self,
num: &Bytes,
denom: &Bytes
) -> Option<<Bytes as MulDiv<&'a Bytes>>::Output>
[src]
self,
num: &Bytes,
denom: &Bytes
) -> Option<<Bytes as MulDiv<&'a Bytes>>::Output>
fn mul_div_ceil(
self,
num: &Bytes,
denom: &Bytes
) -> Option<<Bytes as MulDiv<&'a Bytes>>::Output>
[src]
self,
num: &Bytes,
denom: &Bytes
) -> Option<<Bytes as MulDiv<&'a Bytes>>::Output>
impl MulDiv<Buffers> for Buffers
[src]
type Output = Buffers
fn mul_div_floor(
self,
num: Buffers,
denom: Buffers
) -> Option<<Buffers as MulDiv<Buffers>>::Output>
[src]
self,
num: Buffers,
denom: Buffers
) -> Option<<Buffers as MulDiv<Buffers>>::Output>
fn mul_div_round(
self,
num: Buffers,
denom: Buffers
) -> Option<<Buffers as MulDiv<Buffers>>::Output>
[src]
self,
num: Buffers,
denom: Buffers
) -> Option<<Buffers as MulDiv<Buffers>>::Output>
fn mul_div_ceil(
self,
num: Buffers,
denom: Buffers
) -> Option<<Buffers as MulDiv<Buffers>>::Output>
[src]
self,
num: Buffers,
denom: Buffers
) -> Option<<Buffers as MulDiv<Buffers>>::Output>
impl<'a> MulDiv<Buffers> for &'a Buffers
[src]
type Output = Buffers
fn mul_div_floor(
self,
num: Buffers,
denom: Buffers
) -> Option<<&'a Buffers as MulDiv<Buffers>>::Output>
[src]
self,
num: Buffers,
denom: Buffers
) -> Option<<&'a Buffers as MulDiv<Buffers>>::Output>
fn mul_div_round(
self,
num: Buffers,
denom: Buffers
) -> Option<<&'a Buffers as MulDiv<Buffers>>::Output>
[src]
self,
num: Buffers,
denom: Buffers
) -> Option<<&'a Buffers as MulDiv<Buffers>>::Output>
fn mul_div_ceil(
self,
num: Buffers,
denom: Buffers
) -> Option<<&'a Buffers as MulDiv<Buffers>>::Output>
[src]
self,
num: Buffers,
denom: Buffers
) -> Option<<&'a Buffers as MulDiv<Buffers>>::Output>
impl<'a, 'b> MulDiv<&'b Default> for &'a Default
[src]
type Output = Default
fn mul_div_floor(
self,
num: &Default,
denom: &Default
) -> Option<<&'a Default as MulDiv<&'b Default>>::Output>
[src]
self,
num: &Default,
denom: &Default
) -> Option<<&'a Default as MulDiv<&'b Default>>::Output>
fn mul_div_round(
self,
num: &Default,
denom: &Default
) -> Option<<&'a Default as MulDiv<&'b Default>>::Output>
[src]
self,
num: &Default,
denom: &Default
) -> Option<<&'a Default as MulDiv<&'b Default>>::Output>
fn mul_div_ceil(
self,
num: &Default,
denom: &Default
) -> Option<<&'a Default as MulDiv<&'b Default>>::Output>
[src]
self,
num: &Default,
denom: &Default
) -> Option<<&'a Default as MulDiv<&'b Default>>::Output>
impl<'a, 'b> MulDiv<&'a u64> for &'b ClockTime
[src]
type Output = ClockTime
fn mul_div_floor(
self,
num: &u64,
denom: &u64
) -> Option<<&'b ClockTime as MulDiv<&'a u64>>::Output>
[src]
self,
num: &u64,
denom: &u64
) -> Option<<&'b ClockTime as MulDiv<&'a u64>>::Output>
fn mul_div_round(
self,
num: &u64,
denom: &u64
) -> Option<<&'b ClockTime as MulDiv<&'a u64>>::Output>
[src]
self,
num: &u64,
denom: &u64
) -> Option<<&'b ClockTime as MulDiv<&'a u64>>::Output>
fn mul_div_ceil(
self,
num: &u64,
denom: &u64
) -> Option<<&'b ClockTime as MulDiv<&'a u64>>::Output>
[src]
self,
num: &u64,
denom: &u64
) -> Option<<&'b ClockTime as MulDiv<&'a u64>>::Output>
impl<'a> MulDiv<u64> for ClockTime
[src]
type Output = ClockTime
fn mul_div_floor(
self,
num: u64,
denom: u64
) -> Option<<ClockTime as MulDiv<u64>>::Output>
[src]
self,
num: u64,
denom: u64
) -> Option<<ClockTime as MulDiv<u64>>::Output>
fn mul_div_round(
self,
num: u64,
denom: u64
) -> Option<<ClockTime as MulDiv<u64>>::Output>
[src]
self,
num: u64,
denom: u64
) -> Option<<ClockTime as MulDiv<u64>>::Output>
fn mul_div_ceil(
self,
num: u64,
denom: u64
) -> Option<<ClockTime as MulDiv<u64>>::Output>
[src]
self,
num: u64,
denom: u64
) -> Option<<ClockTime as MulDiv<u64>>::Output>
impl<'a, 'b> MulDiv<&'b ClockTime> for &'a ClockTime
[src]
type Output = ClockTime
fn mul_div_floor(
self,
num: &ClockTime,
denom: &ClockTime
) -> Option<<&'a ClockTime as MulDiv<&'b ClockTime>>::Output>
[src]
self,
num: &ClockTime,
denom: &ClockTime
) -> Option<<&'a ClockTime as MulDiv<&'b ClockTime>>::Output>
fn mul_div_round(
self,
num: &ClockTime,
denom: &ClockTime
) -> Option<<&'a ClockTime as MulDiv<&'b ClockTime>>::Output>
[src]
self,
num: &ClockTime,
denom: &ClockTime
) -> Option<<&'a ClockTime as MulDiv<&'b ClockTime>>::Output>
fn mul_div_ceil(
self,
num: &ClockTime,
denom: &ClockTime
) -> Option<<&'a ClockTime as MulDiv<&'b ClockTime>>::Output>
[src]
self,
num: &ClockTime,
denom: &ClockTime
) -> Option<<&'a ClockTime as MulDiv<&'b ClockTime>>::Output>
impl MulDiv<Default> for Default
[src]
type Output = Default
fn mul_div_floor(
self,
num: Default,
denom: Default
) -> Option<<Default as MulDiv<Default>>::Output>
[src]
self,
num: Default,
denom: Default
) -> Option<<Default as MulDiv<Default>>::Output>
fn mul_div_round(
self,
num: Default,
denom: Default
) -> Option<<Default as MulDiv<Default>>::Output>
[src]
self,
num: Default,
denom: Default
) -> Option<<Default as MulDiv<Default>>::Output>
fn mul_div_ceil(
self,
num: Default,
denom: Default
) -> Option<<Default as MulDiv<Default>>::Output>
[src]
self,
num: Default,
denom: Default
) -> Option<<Default as MulDiv<Default>>::Output>
impl<'a, 'b> MulDiv<&'a u64> for &'b Default
[src]
type Output = Default
fn mul_div_floor(
self,
num: &u64,
denom: &u64
) -> Option<<&'b Default as MulDiv<&'a u64>>::Output>
[src]
self,
num: &u64,
denom: &u64
) -> Option<<&'b Default as MulDiv<&'a u64>>::Output>
fn mul_div_round(
self,
num: &u64,
denom: &u64
) -> Option<<&'b Default as MulDiv<&'a u64>>::Output>
[src]
self,
num: &u64,
denom: &u64
) -> Option<<&'b Default as MulDiv<&'a u64>>::Output>
fn mul_div_ceil(
self,
num: &u64,
denom: &u64
) -> Option<<&'b Default as MulDiv<&'a u64>>::Output>
[src]
self,
num: &u64,
denom: &u64
) -> Option<<&'b Default as MulDiv<&'a u64>>::Output>
impl<'a> MulDiv<&'a u64> for ClockTime
[src]
type Output = ClockTime
fn mul_div_floor(
self,
num: &u64,
denom: &u64
) -> Option<<ClockTime as MulDiv<&'a u64>>::Output>
[src]
self,
num: &u64,
denom: &u64
) -> Option<<ClockTime as MulDiv<&'a u64>>::Output>
fn mul_div_round(
self,
num: &u64,
denom: &u64
) -> Option<<ClockTime as MulDiv<&'a u64>>::Output>
[src]
self,
num: &u64,
denom: &u64
) -> Option<<ClockTime as MulDiv<&'a u64>>::Output>
fn mul_div_ceil(
self,
num: &u64,
denom: &u64
) -> Option<<ClockTime as MulDiv<&'a u64>>::Output>
[src]
self,
num: &u64,
denom: &u64
) -> Option<<ClockTime as MulDiv<&'a u64>>::Output>
impl<'a> MulDiv<u64> for &'a ClockTime
[src]
type Output = ClockTime
fn mul_div_floor(
self,
num: u64,
denom: u64
) -> Option<<&'a ClockTime as MulDiv<u64>>::Output>
[src]
self,
num: u64,
denom: u64
) -> Option<<&'a ClockTime as MulDiv<u64>>::Output>
fn mul_div_round(
self,
num: u64,
denom: u64
) -> Option<<&'a ClockTime as MulDiv<u64>>::Output>
[src]
self,
num: u64,
denom: u64
) -> Option<<&'a ClockTime as MulDiv<u64>>::Output>
fn mul_div_ceil(
self,
num: u64,
denom: u64
) -> Option<<&'a ClockTime as MulDiv<u64>>::Output>
[src]
self,
num: u64,
denom: u64
) -> Option<<&'a ClockTime as MulDiv<u64>>::Output>
impl<'a, 'b> MulDiv<&'a u64> for &'b Bytes
[src]
type Output = Bytes
fn mul_div_floor(
self,
num: &u64,
denom: &u64
) -> Option<<&'b Bytes as MulDiv<&'a u64>>::Output>
[src]
self,
num: &u64,
denom: &u64
) -> Option<<&'b Bytes as MulDiv<&'a u64>>::Output>
fn mul_div_round(
self,
num: &u64,
denom: &u64
) -> Option<<&'b Bytes as MulDiv<&'a u64>>::Output>
[src]
self,
num: &u64,
denom: &u64
) -> Option<<&'b Bytes as MulDiv<&'a u64>>::Output>
fn mul_div_ceil(
self,
num: &u64,
denom: &u64
) -> Option<<&'b Bytes as MulDiv<&'a u64>>::Output>
[src]
self,
num: &u64,
denom: &u64
) -> Option<<&'b Bytes as MulDiv<&'a u64>>::Output>
impl MulDiv<ClockTime> for ClockTime
[src]
type Output = ClockTime
fn mul_div_floor(
self,
num: ClockTime,
denom: ClockTime
) -> Option<<ClockTime as MulDiv<ClockTime>>::Output>
[src]
self,
num: ClockTime,
denom: ClockTime
) -> Option<<ClockTime as MulDiv<ClockTime>>::Output>
fn mul_div_round(
self,
num: ClockTime,
denom: ClockTime
) -> Option<<ClockTime as MulDiv<ClockTime>>::Output>
[src]
self,
num: ClockTime,
denom: ClockTime
) -> Option<<ClockTime as MulDiv<ClockTime>>::Output>
fn mul_div_ceil(
self,
num: ClockTime,
denom: ClockTime
) -> Option<<ClockTime as MulDiv<ClockTime>>::Output>
[src]
self,
num: ClockTime,
denom: ClockTime
) -> Option<<ClockTime as MulDiv<ClockTime>>::Output>
impl<'a> MulDiv<u64> for &'a Default
[src]
type Output = Default
fn mul_div_floor(
self,
num: u64,
denom: u64
) -> Option<<&'a Default as MulDiv<u64>>::Output>
[src]
self,
num: u64,
denom: u64
) -> Option<<&'a Default as MulDiv<u64>>::Output>
fn mul_div_round(
self,
num: u64,
denom: u64
) -> Option<<&'a Default as MulDiv<u64>>::Output>
[src]
self,
num: u64,
denom: u64
) -> Option<<&'a Default as MulDiv<u64>>::Output>
fn mul_div_ceil(
self,
num: u64,
denom: u64
) -> Option<<&'a Default as MulDiv<u64>>::Output>
[src]
self,
num: u64,
denom: u64
) -> Option<<&'a Default as MulDiv<u64>>::Output>
impl<'a, 'b> MulDiv<&'a u64> for &'b Buffers
[src]
type Output = Buffers
fn mul_div_floor(
self,
num: &u64,
denom: &u64
) -> Option<<&'b Buffers as MulDiv<&'a u64>>::Output>
[src]
self,
num: &u64,
denom: &u64
) -> Option<<&'b Buffers as MulDiv<&'a u64>>::Output>
fn mul_div_round(
self,
num: &u64,
denom: &u64
) -> Option<<&'b Buffers as MulDiv<&'a u64>>::Output>
[src]
self,
num: &u64,
denom: &u64
) -> Option<<&'b Buffers as MulDiv<&'a u64>>::Output>
fn mul_div_ceil(
self,
num: &u64,
denom: &u64
) -> Option<<&'b Buffers as MulDiv<&'a u64>>::Output>
[src]
self,
num: &u64,
denom: &u64
) -> Option<<&'b Buffers as MulDiv<&'a u64>>::Output>
impl<'a> MulDiv<u64> for Bytes
[src]
type Output = Bytes
fn mul_div_floor(
self,
num: u64,
denom: u64
) -> Option<<Bytes as MulDiv<u64>>::Output>
[src]
self,
num: u64,
denom: u64
) -> Option<<Bytes as MulDiv<u64>>::Output>
fn mul_div_round(
self,
num: u64,
denom: u64
) -> Option<<Bytes as MulDiv<u64>>::Output>
[src]
self,
num: u64,
denom: u64
) -> Option<<Bytes as MulDiv<u64>>::Output>
fn mul_div_ceil(
self,
num: u64,
denom: u64
) -> Option<<Bytes as MulDiv<u64>>::Output>
[src]
self,
num: u64,
denom: u64
) -> Option<<Bytes as MulDiv<u64>>::Output>
impl<'a> MulDiv<&'a ClockTime> for ClockTime
[src]
type Output = ClockTime
fn mul_div_floor(
self,
num: &ClockTime,
denom: &ClockTime
) -> Option<<ClockTime as MulDiv<&'a ClockTime>>::Output>
[src]
self,
num: &ClockTime,
denom: &ClockTime
) -> Option<<ClockTime as MulDiv<&'a ClockTime>>::Output>
fn mul_div_round(
self,
num: &ClockTime,
denom: &ClockTime
) -> Option<<ClockTime as MulDiv<&'a ClockTime>>::Output>
[src]
self,
num: &ClockTime,
denom: &ClockTime
) -> Option<<ClockTime as MulDiv<&'a ClockTime>>::Output>
fn mul_div_ceil(
self,
num: &ClockTime,
denom: &ClockTime
) -> Option<<ClockTime as MulDiv<&'a ClockTime>>::Output>
[src]
self,
num: &ClockTime,
denom: &ClockTime
) -> Option<<ClockTime as MulDiv<&'a ClockTime>>::Output>
impl<'a> MulDiv<&'a u64> for Bytes
[src]
type Output = Bytes
fn mul_div_floor(
self,
num: &u64,
denom: &u64
) -> Option<<Bytes as MulDiv<&'a u64>>::Output>
[src]
self,
num: &u64,
denom: &u64
) -> Option<<Bytes as MulDiv<&'a u64>>::Output>
fn mul_div_round(
self,
num: &u64,
denom: &u64
) -> Option<<Bytes as MulDiv<&'a u64>>::Output>
[src]
self,
num: &u64,
denom: &u64
) -> Option<<Bytes as MulDiv<&'a u64>>::Output>
fn mul_div_ceil(
self,
num: &u64,
denom: &u64
) -> Option<<Bytes as MulDiv<&'a u64>>::Output>
[src]
self,
num: &u64,
denom: &u64
) -> Option<<Bytes as MulDiv<&'a u64>>::Output>
impl<'a> MulDiv<Default> for &'a Default
[src]
type Output = Default
fn mul_div_floor(
self,
num: Default,
denom: Default
) -> Option<<&'a Default as MulDiv<Default>>::Output>
[src]
self,
num: Default,
denom: Default
) -> Option<<&'a Default as MulDiv<Default>>::Output>
fn mul_div_round(
self,
num: Default,
denom: Default
) -> Option<<&'a Default as MulDiv<Default>>::Output>
[src]
self,
num: Default,
denom: Default
) -> Option<<&'a Default as MulDiv<Default>>::Output>
fn mul_div_ceil(
self,
num: Default,
denom: Default
) -> Option<<&'a Default as MulDiv<Default>>::Output>
[src]
self,
num: Default,
denom: Default
) -> Option<<&'a Default as MulDiv<Default>>::Output>
impl<'a> MulDiv<&'a u64> for Default
[src]
type Output = Default
fn mul_div_floor(
self,
num: &u64,
denom: &u64
) -> Option<<Default as MulDiv<&'a u64>>::Output>
[src]
self,
num: &u64,
denom: &u64
) -> Option<<Default as MulDiv<&'a u64>>::Output>
fn mul_div_round(
self,
num: &u64,
denom: &u64
) -> Option<<Default as MulDiv<&'a u64>>::Output>
[src]
self,
num: &u64,
denom: &u64
) -> Option<<Default as MulDiv<&'a u64>>::Output>
fn mul_div_ceil(
self,
num: &u64,
denom: &u64
) -> Option<<Default as MulDiv<&'a u64>>::Output>
[src]
self,
num: &u64,
denom: &u64
) -> Option<<Default as MulDiv<&'a u64>>::Output>
impl<'a> MulDiv<Bytes> for &'a Bytes
[src]
type Output = Bytes
fn mul_div_floor(
self,
num: Bytes,
denom: Bytes
) -> Option<<&'a Bytes as MulDiv<Bytes>>::Output>
[src]
self,
num: Bytes,
denom: Bytes
) -> Option<<&'a Bytes as MulDiv<Bytes>>::Output>
fn mul_div_round(
self,
num: Bytes,
denom: Bytes
) -> Option<<&'a Bytes as MulDiv<Bytes>>::Output>
[src]
self,
num: Bytes,
denom: Bytes
) -> Option<<&'a Bytes as MulDiv<Bytes>>::Output>
fn mul_div_ceil(
self,
num: Bytes,
denom: Bytes
) -> Option<<&'a Bytes as MulDiv<Bytes>>::Output>
[src]
self,
num: Bytes,
denom: Bytes
) -> Option<<&'a Bytes as MulDiv<Bytes>>::Output>
impl<'a> MulDiv<u64> for Buffers
[src]
type Output = Buffers
fn mul_div_floor(
self,
num: u64,
denom: u64
) -> Option<<Buffers as MulDiv<u64>>::Output>
[src]
self,
num: u64,
denom: u64
) -> Option<<Buffers as MulDiv<u64>>::Output>
fn mul_div_round(
self,
num: u64,
denom: u64
) -> Option<<Buffers as MulDiv<u64>>::Output>
[src]
self,
num: u64,
denom: u64
) -> Option<<Buffers as MulDiv<u64>>::Output>
fn mul_div_ceil(
self,
num: u64,
denom: u64
) -> Option<<Buffers as MulDiv<u64>>::Output>
[src]
self,
num: u64,
denom: u64
) -> Option<<Buffers as MulDiv<u64>>::Output>
impl<'a, 'b> MulDiv<&'b Buffers> for &'a Buffers
[src]
type Output = Buffers
fn mul_div_floor(
self,
num: &Buffers,
denom: &Buffers
) -> Option<<&'a Buffers as MulDiv<&'b Buffers>>::Output>
[src]
self,
num: &Buffers,
denom: &Buffers
) -> Option<<&'a Buffers as MulDiv<&'b Buffers>>::Output>
fn mul_div_round(
self,
num: &Buffers,
denom: &Buffers
) -> Option<<&'a Buffers as MulDiv<&'b Buffers>>::Output>
[src]
self,
num: &Buffers,
denom: &Buffers
) -> Option<<&'a Buffers as MulDiv<&'b Buffers>>::Output>
fn mul_div_ceil(
self,
num: &Buffers,
denom: &Buffers
) -> Option<<&'a Buffers as MulDiv<&'b Buffers>>::Output>
[src]
self,
num: &Buffers,
denom: &Buffers
) -> Option<<&'a Buffers as MulDiv<&'b Buffers>>::Output>
impl<'a> MulDiv<&'a Default> for Default
[src]
type Output = Default
fn mul_div_floor(
self,
num: &Default,
denom: &Default
) -> Option<<Default as MulDiv<&'a Default>>::Output>
[src]
self,
num: &Default,
denom: &Default
) -> Option<<Default as MulDiv<&'a Default>>::Output>
fn mul_div_round(
self,
num: &Default,
denom: &Default
) -> Option<<Default as MulDiv<&'a Default>>::Output>
[src]
self,
num: &Default,
denom: &Default
) -> Option<<Default as MulDiv<&'a Default>>::Output>
fn mul_div_ceil(
self,
num: &Default,
denom: &Default
) -> Option<<Default as MulDiv<&'a Default>>::Output>
[src]
self,
num: &Default,
denom: &Default
) -> Option<<Default as MulDiv<&'a Default>>::Output>
impl<'a> MulDiv<&'a Buffers> for Buffers
[src]
type Output = Buffers
fn mul_div_floor(
self,
num: &Buffers,
denom: &Buffers
) -> Option<<Buffers as MulDiv<&'a Buffers>>::Output>
[src]
self,
num: &Buffers,
denom: &Buffers
) -> Option<<Buffers as MulDiv<&'a Buffers>>::Output>
fn mul_div_round(
self,
num: &Buffers,
denom: &Buffers
) -> Option<<Buffers as MulDiv<&'a Buffers>>::Output>
[src]
self,
num: &Buffers,
denom: &Buffers
) -> Option<<Buffers as MulDiv<&'a Buffers>>::Output>
fn mul_div_ceil(
self,
num: &Buffers,
denom: &Buffers
) -> Option<<Buffers as MulDiv<&'a Buffers>>::Output>
[src]
self,
num: &Buffers,
denom: &Buffers
) -> Option<<Buffers as MulDiv<&'a Buffers>>::Output>
impl<'a> MulDiv<u64> for Default
[src]
type Output = Default
fn mul_div_floor(
self,
num: u64,
denom: u64
) -> Option<<Default as MulDiv<u64>>::Output>
[src]
self,
num: u64,
denom: u64
) -> Option<<Default as MulDiv<u64>>::Output>
fn mul_div_round(
self,
num: u64,
denom: u64
) -> Option<<Default as MulDiv<u64>>::Output>
[src]
self,
num: u64,
denom: u64
) -> Option<<Default as MulDiv<u64>>::Output>
fn mul_div_ceil(
self,
num: u64,
denom: u64
) -> Option<<Default as MulDiv<u64>>::Output>
[src]
self,
num: u64,
denom: u64
) -> Option<<Default as MulDiv<u64>>::Output>
impl<'a> MulDiv<ClockTime> for &'a ClockTime
[src]
type Output = ClockTime
fn mul_div_floor(
self,
num: ClockTime,
denom: ClockTime
) -> Option<<&'a ClockTime as MulDiv<ClockTime>>::Output>
[src]
self,
num: ClockTime,
denom: ClockTime
) -> Option<<&'a ClockTime as MulDiv<ClockTime>>::Output>
fn mul_div_round(
self,
num: ClockTime,
denom: ClockTime
) -> Option<<&'a ClockTime as MulDiv<ClockTime>>::Output>
[src]
self,
num: ClockTime,
denom: ClockTime
) -> Option<<&'a ClockTime as MulDiv<ClockTime>>::Output>
fn mul_div_ceil(
self,
num: ClockTime,
denom: ClockTime
) -> Option<<&'a ClockTime as MulDiv<ClockTime>>::Output>
[src]
self,
num: ClockTime,
denom: ClockTime
) -> Option<<&'a ClockTime as MulDiv<ClockTime>>::Output>
impl<'a> MulDiv<u64> for &'a Buffers
[src]
type Output = Buffers
fn mul_div_floor(
self,
num: u64,
denom: u64
) -> Option<<&'a Buffers as MulDiv<u64>>::Output>
[src]
self,
num: u64,
denom: u64
) -> Option<<&'a Buffers as MulDiv<u64>>::Output>
fn mul_div_round(
self,
num: u64,
denom: u64
) -> Option<<&'a Buffers as MulDiv<u64>>::Output>
[src]
self,
num: u64,
denom: u64
) -> Option<<&'a Buffers as MulDiv<u64>>::Output>
fn mul_div_ceil(
self,
num: u64,
denom: u64
) -> Option<<&'a Buffers as MulDiv<u64>>::Output>
[src]
self,
num: u64,
denom: u64
) -> Option<<&'a Buffers as MulDiv<u64>>::Output>
impl<'a, 'b> MulDiv<&'b Bytes> for &'a Bytes
[src]
type Output = Bytes
fn mul_div_floor(
self,
num: &Bytes,
denom: &Bytes
) -> Option<<&'a Bytes as MulDiv<&'b Bytes>>::Output>
[src]
self,
num: &Bytes,
denom: &Bytes
) -> Option<<&'a Bytes as MulDiv<&'b Bytes>>::Output>
fn mul_div_round(
self,
num: &Bytes,
denom: &Bytes
) -> Option<<&'a Bytes as MulDiv<&'b Bytes>>::Output>
[src]
self,
num: &Bytes,
denom: &Bytes
) -> Option<<&'a Bytes as MulDiv<&'b Bytes>>::Output>
fn mul_div_ceil(
self,
num: &Bytes,
denom: &Bytes
) -> Option<<&'a Bytes as MulDiv<&'b Bytes>>::Output>
[src]
self,
num: &Bytes,
denom: &Bytes
) -> Option<<&'a Bytes as MulDiv<&'b Bytes>>::Output>