pub struct LeanWorkerModuleCacheLimits { /* private fields */ }Expand description
Typed limits for the worker child’s module snapshot cache.
The worker child still receives these values as environment variables at launch time, but the public API names the lifecycle policy rather than the transport mechanism. A field left unset uses the child default.
Implementations§
Source§impl LeanWorkerModuleCacheLimits
impl LeanWorkerModuleCacheLimits
Sourcepub fn max_entries(self, max_entries: u64) -> Self
pub fn max_entries(self, max_entries: u64) -> Self
Set the maximum retained cache entries.
Sourcepub fn max_bytes(self, max_bytes: u64) -> Self
pub fn max_bytes(self, max_bytes: u64) -> Self
Set the approximate retained-cache byte ceiling.
Sourcepub fn rss_guard_kib(self, rss_guard_kib: u64) -> Self
pub fn rss_guard_kib(self, rss_guard_kib: u64) -> Self
Set the child RSS guard above which the child clears retained snapshots before cacheable module-query requests.
Sourcepub fn verify_rss_taint_kib(self, verify_rss_taint_kib: u64) -> Self
pub fn verify_rss_taint_kib(self, verify_rss_taint_kib: u64) -> Self
Set the child RSS ceiling at or above which a non-positive
verify_declaration verdict (e.g. NotFound) is relabeled to
BudgetExceeded: near the cap the worker cannot distinguish a genuine
“name absent” from an elaboration silently degraded by memory pressure.
Leave unset (the default) to disable the taint; set it well above the
warm mathlib baseline so genuine name-absent queries are not mislabeled.
Trait Implementations§
Source§impl Clone for LeanWorkerModuleCacheLimits
impl Clone for LeanWorkerModuleCacheLimits
Source§fn clone(&self) -> LeanWorkerModuleCacheLimits
fn clone(&self) -> LeanWorkerModuleCacheLimits
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for LeanWorkerModuleCacheLimits
Source§impl Debug for LeanWorkerModuleCacheLimits
impl Debug for LeanWorkerModuleCacheLimits
Source§impl Default for LeanWorkerModuleCacheLimits
impl Default for LeanWorkerModuleCacheLimits
Source§fn default() -> LeanWorkerModuleCacheLimits
fn default() -> LeanWorkerModuleCacheLimits
impl Eq for LeanWorkerModuleCacheLimits
Source§impl PartialEq for LeanWorkerModuleCacheLimits
impl PartialEq for LeanWorkerModuleCacheLimits
Source§fn eq(&self, other: &LeanWorkerModuleCacheLimits) -> bool
fn eq(&self, other: &LeanWorkerModuleCacheLimits) -> bool
self and other values to be equal, and is used by ==.