pub struct FreshnessConfig {
pub enabled: bool,
pub cooldown_secs: u64,
}Expand description
Configuration for the release-freshness signal (issue #145).
Controls whether a recently published “latest” version is flagged as still within a cooldown window, mirroring GitHub Dependabot’s default 3-day package cooldown. Applied uniformly across all ecosystems — no per-ecosystem override.
§Defaults
enabled:truecooldown_secs:259200(3 days)
§Examples
use deps_lsp::config::FreshnessConfig;
let config = FreshnessConfig {
enabled: true,
cooldown_secs: 3600,
};
assert_eq!(config.cooldown_secs, 3600);Fields§
§enabled: bool§cooldown_secs: u64Cooldown window in seconds, clamped to 0..=30 days (default: 3 days)
Implementations§
Source§impl FreshnessConfig
impl FreshnessConfig
Sourcepub const fn to_settings(&self) -> FreshnessSettings
pub const fn to_settings(&self) -> FreshnessSettings
Converts this LSP-facing config into the deps-core DTO threaded
through Ecosystem::generate_hover/generate_diagnostics.
§Examples
use deps_lsp::config::FreshnessConfig;
let config = FreshnessConfig::default();
let settings = config.to_settings();
assert!(settings.enabled);Trait Implementations§
Source§impl Clone for FreshnessConfig
impl Clone for FreshnessConfig
Source§fn clone(&self) -> FreshnessConfig
fn clone(&self) -> FreshnessConfig
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 FreshnessConfig
impl Debug for FreshnessConfig
Source§impl Default for FreshnessConfig
impl Default for FreshnessConfig
Source§impl<'de> Deserialize<'de> for FreshnessConfig
impl<'de> Deserialize<'de> for FreshnessConfig
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 FreshnessConfig
impl RefUnwindSafe for FreshnessConfig
impl Send for FreshnessConfig
impl Sync for FreshnessConfig
impl Unpin for FreshnessConfig
impl UnsafeUnpin for FreshnessConfig
impl UnwindSafe for FreshnessConfig
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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