Skip to main content

MstWeight

Trait MstWeight 

Source
pub trait MstWeight:
    Ord
    + Clone
    + Default {
    // Required method
    fn checked_add(&self, rhs: &Self) -> Option<Self>;
}
Expand description

Integer weights that can report overflow while summing MST totals.

Required Methods§

Source

fn checked_add(&self, rhs: &Self) -> Option<Self>

Returns self + rhs, or None when the sum overflows.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl MstWeight for i8

Source§

fn checked_add(&self, rhs: &Self) -> Option<Self>

Source§

impl MstWeight for i16

Source§

fn checked_add(&self, rhs: &Self) -> Option<Self>

Source§

impl MstWeight for i32

Source§

fn checked_add(&self, rhs: &Self) -> Option<Self>

Source§

impl MstWeight for i64

Source§

fn checked_add(&self, rhs: &Self) -> Option<Self>

Source§

impl MstWeight for i128

Source§

fn checked_add(&self, rhs: &Self) -> Option<Self>

Source§

impl MstWeight for isize

Source§

fn checked_add(&self, rhs: &Self) -> Option<Self>

Source§

impl MstWeight for u8

Source§

fn checked_add(&self, rhs: &Self) -> Option<Self>

Source§

impl MstWeight for u16

Source§

fn checked_add(&self, rhs: &Self) -> Option<Self>

Source§

impl MstWeight for u32

Source§

fn checked_add(&self, rhs: &Self) -> Option<Self>

Source§

impl MstWeight for u64

Source§

fn checked_add(&self, rhs: &Self) -> Option<Self>

Source§

impl MstWeight for u128

Source§

fn checked_add(&self, rhs: &Self) -> Option<Self>

Source§

impl MstWeight for usize

Source§

fn checked_add(&self, rhs: &Self) -> Option<Self>

Implementors§