Skip to main content

WeightTrait

Trait WeightTrait 

Source
pub trait WeightTrait: DataTrait + Weight {
    // Provided methods
    fn add(&self, rhs: &Self, result: &mut Self) { ... }
    fn add_assign(&mut self, rhs: &Self) { ... }
}
Expand description

A trait for trait objects that represent weights.

Provided Methods§

Source

fn add(&self, rhs: &Self, result: &mut Self)

Add rhs to self and store the result in result.

Source

fn add_assign(&mut self, rhs: &Self)

Add rhs to self, store the result in self.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<Trait> WeightTrait for Trait
where Trait: DataTrait + Weight + ?Sized,