pub struct DriftVisualization<'a> { /* private fields */ }Expand description
Compound widget rendering drift-triggered fallback visualization.
Shows one sparkline row per decision domain, color-coded by confidence zone:
- Green zone (>0.7): high confidence, Bayesian strategy active
- Yellow zone (0.3–0.7): moderate confidence, potential drift
- Red zone (<0.3): low confidence, fallback likely/active
When a domain enters fallback, a vertical marker appears on the sparkline and a regime banner flashes.
Implementations§
Source§impl<'a> DriftVisualization<'a>
impl<'a> DriftVisualization<'a>
Sourcepub fn new(timeline: &'a DriftTimeline) -> Self
pub fn new(timeline: &'a DriftTimeline) -> Self
Create a new drift visualization from a timeline.
Sourcepub fn domains(self, domains: Vec<DecisionDomain>) -> Self
pub fn domains(self, domains: Vec<DecisionDomain>) -> Self
Only display the specified domains.
Sourcepub fn border_type(self, border_type: BorderType) -> Self
pub fn border_type(self, border_type: BorderType) -> Self
Set the border type.
Enable or disable the regime banner row.
Sourcepub fn fallback_threshold(self, t: f64) -> Self
pub fn fallback_threshold(self, t: f64) -> Self
Set the fallback confidence threshold (default 0.3).
Sourcepub fn caution_threshold(self, t: f64) -> Self
pub fn caution_threshold(self, t: f64) -> Self
Set the caution confidence threshold (default 0.7).
Sourcepub fn min_height(&self) -> u16
pub fn min_height(&self) -> u16
Minimum height needed for the widget.
Trait Implementations§
Source§impl<'a> Clone for DriftVisualization<'a>
impl<'a> Clone for DriftVisualization<'a>
Source§fn clone(&self) -> DriftVisualization<'a>
fn clone(&self) -> DriftVisualization<'a>
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<'a> Debug for DriftVisualization<'a>
impl<'a> Debug for DriftVisualization<'a>
Auto Trait Implementations§
impl<'a> Freeze for DriftVisualization<'a>
impl<'a> RefUnwindSafe for DriftVisualization<'a>
impl<'a> Send for DriftVisualization<'a>
impl<'a> Sync for DriftVisualization<'a>
impl<'a> Unpin for DriftVisualization<'a>
impl<'a> UnsafeUnpin for DriftVisualization<'a>
impl<'a> UnwindSafe for DriftVisualization<'a>
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