referrerpolicy=no-referrer-when-downgrade

Trait polkadot_service::runtime_traits::Scale

source ·
pub trait Scale<Other> {
    type Output;

    // Required methods
    fn mul(self, other: Other) -> Self::Output;
    fn div(self, other: Other) -> Self::Output;
    fn rem(self, other: Other) -> Self::Output;
}
Expand description

Multiply and divide by a number that isn’t necessarily the same type. Basically just the same as Mul and Div except it can be used for all basic numeric types.

Required Associated Types§

source

type Output

The output type of the product of self and Other.

Required Methods§

source

fn mul(self, other: Other) -> Self::Output

@return the product of self and other.

source

fn div(self, other: Other) -> Self::Output

@return the integer division of self and other.

source

fn rem(self, other: Other) -> Self::Output

@return the modulo remainder of self and other.

Implementations on Foreign Types§

source§

impl Scale<u8> for u8

§

type Output = u8

source§

fn mul(self, other: u8) -> <u8 as Scale<u8>>::Output

source§

fn div(self, other: u8) -> <u8 as Scale<u8>>::Output

source§

fn rem(self, other: u8) -> <u8 as Scale<u8>>::Output

source§

impl Scale<u8> for u16

§

type Output = u16

source§

fn mul(self, other: u8) -> <u16 as Scale<u8>>::Output

source§

fn div(self, other: u8) -> <u16 as Scale<u8>>::Output

source§

fn rem(self, other: u8) -> <u16 as Scale<u8>>::Output

source§

impl Scale<u8> for u32

§

type Output = u32

source§

fn mul(self, other: u8) -> <u32 as Scale<u8>>::Output

source§

fn div(self, other: u8) -> <u32 as Scale<u8>>::Output

source§

fn rem(self, other: u8) -> <u32 as Scale<u8>>::Output

source§

impl Scale<u8> for u64

§

type Output = u64

source§

fn mul(self, other: u8) -> <u64 as Scale<u8>>::Output

source§

fn div(self, other: u8) -> <u64 as Scale<u8>>::Output

source§

fn rem(self, other: u8) -> <u64 as Scale<u8>>::Output

source§

impl Scale<u8> for u128

§

type Output = u128

source§

fn mul(self, other: u8) -> <u128 as Scale<u8>>::Output

source§

fn div(self, other: u8) -> <u128 as Scale<u8>>::Output

source§

fn rem(self, other: u8) -> <u128 as Scale<u8>>::Output

source§

impl Scale<u16> for u16

§

type Output = u16

source§

fn mul(self, other: u16) -> <u16 as Scale<u16>>::Output

source§

fn div(self, other: u16) -> <u16 as Scale<u16>>::Output

source§

fn rem(self, other: u16) -> <u16 as Scale<u16>>::Output

source§

impl Scale<u16> for u32

§

type Output = u32

source§

fn mul(self, other: u16) -> <u32 as Scale<u16>>::Output

source§

fn div(self, other: u16) -> <u32 as Scale<u16>>::Output

source§

fn rem(self, other: u16) -> <u32 as Scale<u16>>::Output

source§

impl Scale<u16> for u64

§

type Output = u64

source§

fn mul(self, other: u16) -> <u64 as Scale<u16>>::Output

source§

fn div(self, other: u16) -> <u64 as Scale<u16>>::Output

source§

fn rem(self, other: u16) -> <u64 as Scale<u16>>::Output

source§

impl Scale<u16> for u128

§

type Output = u128

source§

fn mul(self, other: u16) -> <u128 as Scale<u16>>::Output

source§

fn div(self, other: u16) -> <u128 as Scale<u16>>::Output

source§

fn rem(self, other: u16) -> <u128 as Scale<u16>>::Output

source§

impl Scale<u32> for u32

§

type Output = u32

source§

fn mul(self, other: u32) -> <u32 as Scale<u32>>::Output

source§

fn div(self, other: u32) -> <u32 as Scale<u32>>::Output

source§

fn rem(self, other: u32) -> <u32 as Scale<u32>>::Output

source§

impl Scale<u32> for u64

§

type Output = u64

source§

fn mul(self, other: u32) -> <u64 as Scale<u32>>::Output

source§

fn div(self, other: u32) -> <u64 as Scale<u32>>::Output

source§

fn rem(self, other: u32) -> <u64 as Scale<u32>>::Output

source§

impl Scale<u32> for u128

§

type Output = u128

source§

fn mul(self, other: u32) -> <u128 as Scale<u32>>::Output

source§

fn div(self, other: u32) -> <u128 as Scale<u32>>::Output

source§

fn rem(self, other: u32) -> <u128 as Scale<u32>>::Output

source§

impl Scale<u64> for u64

§

type Output = u64

source§

fn mul(self, other: u64) -> <u64 as Scale<u64>>::Output

source§

fn div(self, other: u64) -> <u64 as Scale<u64>>::Output

source§

fn rem(self, other: u64) -> <u64 as Scale<u64>>::Output

source§

impl Scale<u64> for u128

§

type Output = u128

source§

fn mul(self, other: u64) -> <u128 as Scale<u64>>::Output

source§

fn div(self, other: u64) -> <u128 as Scale<u64>>::Output

source§

fn rem(self, other: u64) -> <u128 as Scale<u64>>::Output

source§

impl Scale<u128> for u128

§

type Output = u128

source§

fn mul(self, other: u128) -> <u128 as Scale<u128>>::Output

source§

fn div(self, other: u128) -> <u128 as Scale<u128>>::Output

source§

fn rem(self, other: u128) -> <u128 as Scale<u128>>::Output

Implementors§