Skip to main content

WeightsFunction

Trait WeightsFunction 

Source
pub trait WeightsFunction {
    // Required method
    fn weight(&self, pos: usize, max_pos: usize) -> Weight;
}
Expand description

Represents a function that maps a position to a weight.

Required Methods§

Source

fn weight(&self, pos: usize, max_pos: usize) -> Weight

Returns the weight at the given position.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§