pub enum ReliabilityBand {
High,
Medium,
Low,
}Expand description
Discrete interpretation band for a ReliabilityScore.
Boundaries: Low for [0.0, 0.50), Medium for [0.50, 0.85),
High for [0.85, 1.00]. The enum serializes as a lowercase string
("low", "medium", "high") so MCP and JSON consumers can branch
without parsing the float overall field.
§Example
use stygian_plugin::reliability::ReliabilityBand;
assert_eq!(ReliabilityBand::from_overall(0.95), ReliabilityBand::High);
assert_eq!(ReliabilityBand::from_overall(0.60), ReliabilityBand::Medium);
assert_eq!(ReliabilityBand::from_overall(0.10), ReliabilityBand::Low);Variants§
High
Score in [0.85, 1.00] — production-ready.
Medium
Score in [0.50, 0.85) — best-effort.
Low
Score in [0.00, 0.50) — unreliable; consider fallback.
Implementations§
Source§impl ReliabilityBand
impl ReliabilityBand
Sourcepub fn from_overall(overall: f32) -> Self
pub fn from_overall(overall: f32) -> Self
Map a raw overall score to its ReliabilityBand.
§Example
use stygian_plugin::reliability::ReliabilityBand;
assert_eq!(ReliabilityBand::from_overall(1.0), ReliabilityBand::High);
assert_eq!(ReliabilityBand::from_overall(0.8499), ReliabilityBand::Medium);Trait Implementations§
Source§impl Clone for ReliabilityBand
impl Clone for ReliabilityBand
Source§fn clone(&self) -> ReliabilityBand
fn clone(&self) -> ReliabilityBand
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ReliabilityBand
Source§impl Debug for ReliabilityBand
impl Debug for ReliabilityBand
Source§impl<'de> Deserialize<'de> for ReliabilityBand
impl<'de> Deserialize<'de> for ReliabilityBand
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 Display for ReliabilityBand
impl Display for ReliabilityBand
impl Eq for ReliabilityBand
Source§impl Hash for ReliabilityBand
impl Hash for ReliabilityBand
Source§impl PartialEq for ReliabilityBand
impl PartialEq for ReliabilityBand
Source§fn eq(&self, other: &ReliabilityBand) -> bool
fn eq(&self, other: &ReliabilityBand) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ReliabilityBand
impl Serialize for ReliabilityBand
impl StructuralPartialEq for ReliabilityBand
Auto Trait Implementations§
impl Freeze for ReliabilityBand
impl RefUnwindSafe for ReliabilityBand
impl Send for ReliabilityBand
impl Sync for ReliabilityBand
impl Unpin for ReliabilityBand
impl UnsafeUnpin for ReliabilityBand
impl UnwindSafe for ReliabilityBand
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