pub struct FallbackStats {
pub total_lines: u64,
pub shaped_lines: u64,
pub fallback_lines: u64,
pub rejected_lines: u64,
pub skipped_lines: u64,
}Expand description
Accumulated fallback statistics for monitoring quality degradation.
Fields§
§total_lines: u64Total lines processed.
shaped_lines: u64Lines that used full shaping.
fallback_lines: u64Lines that fell back to NoopShaper.
rejected_lines: u64Lines where shaping was rejected after attempt.
skipped_lines: u64Lines skipped by policy.
Implementations§
Source§impl FallbackStats
impl FallbackStats
Sourcepub fn record(&mut self, event: FallbackEvent)
pub fn record(&mut self, event: FallbackEvent)
Record a fallback event.
Sourcepub fn shaping_rate(&self) -> f64
pub fn shaping_rate(&self) -> f64
Fraction of lines that used full shaping (0.0-1.0).
Sourcepub fn fallback_rate(&self) -> f64
pub fn fallback_rate(&self) -> f64
Fraction of lines that fell back (0.0-1.0).
Trait Implementations§
Source§impl Clone for FallbackStats
impl Clone for FallbackStats
Source§fn clone(&self) -> FallbackStats
fn clone(&self) -> FallbackStats
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 FallbackStats
impl Debug for FallbackStats
Source§impl Default for FallbackStats
impl Default for FallbackStats
Source§fn default() -> FallbackStats
fn default() -> FallbackStats
Returns the “default value” for a type. Read more
Source§impl PartialEq for FallbackStats
impl PartialEq for FallbackStats
impl Copy for FallbackStats
impl Eq for FallbackStats
impl StructuralPartialEq for FallbackStats
Auto Trait Implementations§
impl Freeze for FallbackStats
impl RefUnwindSafe for FallbackStats
impl Send for FallbackStats
impl Sync for FallbackStats
impl Unpin for FallbackStats
impl UnsafeUnpin for FallbackStats
impl UnwindSafe for FallbackStats
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.