pub struct ProfileWeights {
pub success: f64,
pub latency: f64,
pub retry: f64,
pub failure: f64,
}Expand description
Configurable weights for the four scoring terms.
Defaults sum to 1.0 so the output is in [0.0, 1.0]
when all weights are non-negative. Custom weights are
not required to sum to 1.0 — the scorer re-normalises
by dividing by the weight sum, so callers can experiment
with relative emphasis without losing the unit-interval
property.
Fields§
§success: f64Weight applied to the success-rate term.
latency: f64Weight applied to the latency-score term.
retry: f64Weight applied to the retry-score term.
failure: f64Weight applied to the (1 - failure_severity) term.
Trait Implementations§
Source§impl Clone for ProfileWeights
impl Clone for ProfileWeights
Source§fn clone(&self) -> ProfileWeights
fn clone(&self) -> ProfileWeights
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProfileWeights
impl Debug for ProfileWeights
Source§impl Default for ProfileWeights
impl Default for ProfileWeights
Source§impl<'de> Deserialize<'de> for ProfileWeights
impl<'de> Deserialize<'de> for ProfileWeights
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ProfileWeights
impl PartialEq for ProfileWeights
Source§impl Serialize for ProfileWeights
impl Serialize for ProfileWeights
impl Copy for ProfileWeights
impl StructuralPartialEq for ProfileWeights
Auto Trait Implementations§
impl Freeze for ProfileWeights
impl RefUnwindSafe for ProfileWeights
impl Send for ProfileWeights
impl Sync for ProfileWeights
impl Unpin for ProfileWeights
impl UnsafeUnpin for ProfileWeights
impl UnwindSafe for ProfileWeights
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more