#[non_exhaustive]pub enum StalenessHint {
Fresh,
PendingIndex {},
Stale {},
}Expand description
Per-file staleness hint attached to retrieval hits at query time.
Encodes the freshness relationship between the indexed graph snapshot and the live file state. Query-time freshness diagnostics can distinguish an answer served from an older completed scope while a matching refresh task is still pending from a scope that is simply stale.
New variants may be added in future releases; match exhaustively or use a wildcard to remain forward-compatible.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Fresh
PendingIndex
A matching index task is queued, running, or retrying for this query.
Stale
Indexed snapshot is older than the latest file modification.
Implementations§
Source§impl StalenessHint
impl StalenessHint
pub fn requires_source_verification(&self) -> bool
pub fn should_replace(&self, current: Option<&Self>) -> bool
Trait Implementations§
Source§impl Clone for StalenessHint
impl Clone for StalenessHint
Source§fn clone(&self) -> StalenessHint
fn clone(&self) -> StalenessHint
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 StalenessHint
impl Debug for StalenessHint
Source§impl<'de> Deserialize<'de> for StalenessHint
impl<'de> Deserialize<'de> for StalenessHint
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 StalenessHint
impl PartialEq for StalenessHint
Source§impl Serialize for StalenessHint
impl Serialize for StalenessHint
impl StructuralPartialEq for StalenessHint
Auto Trait Implementations§
impl Freeze for StalenessHint
impl RefUnwindSafe for StalenessHint
impl Send for StalenessHint
impl Sync for StalenessHint
impl Unpin for StalenessHint
impl UnsafeUnpin for StalenessHint
impl UnwindSafe for StalenessHint
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