Trait sp_runtime::traits::Scale [−][src]
pub trait Scale<Other> {
type Output;
fn mul(self, other: Other) -> Self::Output;
fn div(self, other: Other) -> Self::Output;
fn rem(self, other: Other) -> Self::Output;
}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.
Associated Types
Loading content...Required methods
fn mul(self, other: Other) -> Self::Output[src]
@return the product of self and other.
fn div(self, other: Other) -> Self::Output[src]
@return the integer division of self and other.
fn rem(self, other: Other) -> Self::Output[src]
@return the modulo remainder of self and other.
Implementations on Foreign Types
impl Scale<u128> for u128[src]
impl Scale<u128> for u128[src]impl Scale<u64> for u128[src]
impl Scale<u64> for u128[src]impl Scale<u32> for u128[src]
impl Scale<u32> for u128[src]impl Scale<u16> for u128[src]
impl Scale<u16> for u128[src]impl Scale<u8> for u128[src]
impl Scale<u8> for u128[src]impl Scale<u64> for u64[src]
impl Scale<u64> for u64[src]impl Scale<u32> for u64[src]
impl Scale<u32> for u64[src]impl Scale<u16> for u64[src]
impl Scale<u16> for u64[src]impl Scale<u8> for u64[src]
impl Scale<u8> for u64[src]impl Scale<u32> for u32[src]
impl Scale<u32> for u32[src]impl Scale<u16> for u32[src]
impl Scale<u16> for u32[src]impl Scale<u8> for u32[src]
impl Scale<u8> for u32[src]impl Scale<u16> for u16[src]
impl Scale<u16> for u16[src]impl Scale<u8> for u16[src]
impl Scale<u8> for u16[src]impl Scale<u8> for u8[src]
impl Scale<u8> for u8[src]