pub struct EditQualityStore {
pub pairs: HashMap<String, PairStats>,
pub pending_escalations: HashMap<String, u64>,
pub pending_anchored_escalations: HashMap<String, u64>,
pub escalations_served: u64,
/* private fields */
}Fields§
§pairs: HashMap<String, PairStats>Key: "{ext}|{mode}" (e.g. "rs|map").
pending_escalations: HashMap<String, u64>Normalized path -> unix time of the compression-correlated edit fail.
pending_anchored_escalations: HashMap<String, u64>Normalized path -> unix time of an anchored-edit (ctx_patch) staleness
miss. The next auto read of that path resolves to anchored (not full),
so the model gets fresh line anchors to retry by reference (#1008).
#[serde(default)] keeps stores written before anchored editing loadable.
escalations_served: u64All-time counter of consumed escalations (observability).
Implementations§
Source§impl EditQualityStore
impl EditQualityStore
pub fn record_failure(&mut self, ext: &str, mode: &str, now: u64)
pub fn record_success(&mut self, ext: &str, mode: &str)
pub fn set_pending_escalation(&mut self, norm_path: &str, now: u64)
Sourcepub fn take_pending_escalation(&mut self, norm_path: &str, now: u64) -> bool
pub fn take_pending_escalation(&mut self, norm_path: &str, now: u64) -> bool
Consumes the escalation for this path if present and not expired.
pub fn set_pending_anchored_escalation(&mut self, norm_path: &str, now: u64)
Sourcepub fn take_pending_anchored_escalation(
&mut self,
norm_path: &str,
now: u64,
) -> bool
pub fn take_pending_anchored_escalation( &mut self, norm_path: &str, now: u64, ) -> bool
Consumes the anchored escalation for this path if present and not expired.
pub fn is_risky(&self, ext: &str, mode: &str) -> bool
pub fn save(&self) -> Result<()>
Trait Implementations§
Source§impl Clone for EditQualityStore
impl Clone for EditQualityStore
Source§fn clone(&self) -> EditQualityStore
fn clone(&self) -> EditQualityStore
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 moreSource§impl Debug for EditQualityStore
impl Debug for EditQualityStore
Source§impl Default for EditQualityStore
impl Default for EditQualityStore
Source§fn default() -> EditQualityStore
fn default() -> EditQualityStore
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EditQualityStore
impl<'de> Deserialize<'de> for EditQualityStore
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
Auto Trait Implementations§
impl Freeze for EditQualityStore
impl RefUnwindSafe for EditQualityStore
impl Send for EditQualityStore
impl Sync for EditQualityStore
impl Unpin for EditQualityStore
impl UnsafeUnpin for EditQualityStore
impl UnwindSafe for EditQualityStore
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more