Skip to main content

Multiply

Trait Multiply 

Source
pub trait Multiply<Rhs = Self> {
    type Output;

    // Required method
    fn multiply(self, rhs: &Rhs) -> Self::Output;
}
Expand description

A replacement for std::ops::Mul for types that do not implement it.

Required Associated Types§

Source

type Output

Output type per the Mul trait.

Required Methods§

Source

fn multiply(self, rhs: &Rhs) -> Self::Output

Core method per the Mul trait.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Multiply for i8

Source§

type Output = i8

Source§

fn multiply(self, rhs: &Self) -> Self

Source§

impl Multiply for i16

Source§

type Output = i16

Source§

fn multiply(self, rhs: &Self) -> Self

Source§

impl Multiply for i32

Source§

type Output = i32

Source§

fn multiply(self, rhs: &Self) -> Self

Source§

impl Multiply for i64

Source§

type Output = i64

Source§

fn multiply(self, rhs: &Self) -> Self

Source§

impl Multiply for i128

Source§

type Output = i128

Source§

fn multiply(self, rhs: &Self) -> Self

Source§

impl Multiply for isize

Source§

type Output = isize

Source§

fn multiply(self, rhs: &Self) -> Self

Source§

impl Multiply for u8

Source§

type Output = u8

Source§

fn multiply(self, rhs: &Self) -> Self

Source§

impl Multiply for u16

Source§

type Output = u16

Source§

fn multiply(self, rhs: &Self) -> Self

Source§

impl Multiply for u32

Source§

type Output = u32

Source§

fn multiply(self, rhs: &Self) -> Self

Source§

impl Multiply for u64

Source§

type Output = u64

Source§

fn multiply(self, rhs: &Self) -> Self

Source§

impl Multiply for u128

Source§

type Output = u128

Source§

fn multiply(self, rhs: &Self) -> Self

Source§

impl Multiply for usize

Source§

type Output = usize

Source§

fn multiply(self, rhs: &Self) -> Self

Source§

impl Multiply for Wrapping<i8>

Source§

type Output = Wrapping<i8>

Source§

fn multiply(self, rhs: &Self) -> Self

Source§

impl Multiply for Wrapping<i16>

Source§

type Output = Wrapping<i16>

Source§

fn multiply(self, rhs: &Self) -> Self

Source§

impl Multiply for Wrapping<i32>

Source§

type Output = Wrapping<i32>

Source§

fn multiply(self, rhs: &Self) -> Self

Source§

impl Multiply for Wrapping<i64>

Source§

type Output = Wrapping<i64>

Source§

fn multiply(self, rhs: &Self) -> Self

Source§

impl Multiply for Wrapping<i128>

Source§

type Output = Wrapping<i128>

Source§

fn multiply(self, rhs: &Self) -> Self

Source§

impl Multiply for Wrapping<isize>

Source§

type Output = Wrapping<isize>

Source§

fn multiply(self, rhs: &Self) -> Self

Source§

impl<T> Multiply<T> for ()

Source§

type Output = ()

Source§

fn multiply(self, rhs: &T) -> Self::Output

Source§

impl<T, A1: Multiply<T>> Multiply<T> for (A1,)

Source§

type Output = (<A1 as Multiply<T>>::Output,)

Source§

fn multiply(self, rhs: &T) -> Self::Output

Source§

impl<T, A1: Multiply<T>, B1: Multiply<T>> Multiply<T> for (A1, B1)

Source§

type Output = (<A1 as Multiply<T>>::Output, <B1 as Multiply<T>>::Output)

Source§

fn multiply(self, rhs: &T) -> Self::Output

Source§

impl<T, A1: Multiply<T>, B1: Multiply<T>, C1: Multiply<T>> Multiply<T> for (A1, B1, C1)

Source§

type Output = (<A1 as Multiply<T>>::Output, <B1 as Multiply<T>>::Output, <C1 as Multiply<T>>::Output)

Source§

fn multiply(self, rhs: &T) -> Self::Output

Source§

impl<T, A1: Multiply<T>, B1: Multiply<T>, C1: Multiply<T>, D1: Multiply<T>> Multiply<T> for (A1, B1, C1, D1)

Source§

type Output = (<A1 as Multiply<T>>::Output, <B1 as Multiply<T>>::Output, <C1 as Multiply<T>>::Output, <D1 as Multiply<T>>::Output)

Source§

fn multiply(self, rhs: &T) -> Self::Output

Source§

impl<T, R: Multiply<T>> Multiply<T> for Vec<R>

Source§

type Output = Vec<<R as Multiply<T>>::Output>

Source§

fn multiply(self, rhs: &T) -> Self::Output

Implementors§