Trait WeightedResource

Source
pub trait WeightedResource {
    // Required methods
    fn weight(&self) -> f32;
    fn with_weight(&mut self, weight: f32) -> &Self;
}
Expand description

Resource can be ‘weighted’. This allows use in uri_routes, after digestion to sort paths in the final required. order.

Required Methods§

Source

fn weight(&self) -> f32

The sorting weight value of this.

Source

fn with_weight(&mut self, weight: f32) -> &Self

Determines the ordering weight to be used by pre-digestion sorting.

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§