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§
Sourcefn with_weight(&mut self, weight: f32) -> &Self
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.