pub struct FreshnessSettings {
pub enabled: bool,
pub cooldown_secs: u64,
}Expand description
LSP-facing freshness settings, threaded into hover/diagnostics/completion.
A Copy DTO so it can be snapshotted from deps-lsp’s
Arc<RwLock<DepsConfig>> before an .await point (matching the existing
CacheConfig snapshot-before-await pattern) and passed by value into
Ecosystem::generate_hover/generate_diagnostics, without holding the
config lock across the call.
§Examples
use deps_core::FreshnessSettings;
let settings = FreshnessSettings::default();
assert!(settings.enabled);
assert_eq!(settings.cooldown_secs, deps_core::DEFAULT_COOLDOWN_SECS);Fields§
§enabled: boolWhether the freshness signal is rendered at all.
cooldown_secs: u64Cooldown window, in seconds, below which a publish age is “recent”.
Trait Implementations§
Source§impl Clone for FreshnessSettings
impl Clone for FreshnessSettings
Source§fn clone(&self) -> FreshnessSettings
fn clone(&self) -> FreshnessSettings
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 FreshnessSettings
Source§impl Debug for FreshnessSettings
impl Debug for FreshnessSettings
Source§impl Default for FreshnessSettings
impl Default for FreshnessSettings
impl Eq for FreshnessSettings
Source§impl PartialEq for FreshnessSettings
impl PartialEq for FreshnessSettings
Source§fn eq(&self, other: &FreshnessSettings) -> bool
fn eq(&self, other: &FreshnessSettings) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FreshnessSettings
Auto Trait Implementations§
impl Freeze for FreshnessSettings
impl RefUnwindSafe for FreshnessSettings
impl Send for FreshnessSettings
impl Sync for FreshnessSettings
impl Unpin for FreshnessSettings
impl UnsafeUnpin for FreshnessSettings
impl UnwindSafe for FreshnessSettings
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.