#[non_exhaustive]pub struct LintOptions {
pub deadline: Option<Instant>,
}Expand description
Per-call options for Engine::lint_with_options.
Phase 1 status (current build): the type surface ships, but
Engine::lint_with_options IGNORES deadline. The pass always
runs to completion, returns truncated: false, and leaves
candidates_processed / candidates_total at 0. The semantics
below describe the Phase 2 behavior that lands in tasks
T007–T009; consult the changelog (Appendix C in the security
whitepaper) before relying on deadline behavior in production.
deadline is an absolute wall-clock instant after which the
engine MUST abort cooperatively. Spec §R1, §R3:
None(default) — no budget; lint runs to completion.Some(d)whered <= Instant::now()— pre-pass abort returns immediately withLintResult { truncated: true, candidates_processed: 0, candidates_total: 0, diagnostics: vec![] }.Some(d)whered > Instant::now()— engine checks the deadline at each candidate boundary; on expiry the loop breaks andLintResult.truncatedis set totruewith partial counts.
The choice of Instant over Duration is deliberate: callers
stamp the deadline once at the boundary they care about
(request arrival, document permit acquisition for batch) and
the engine carries no implicit clock. This makes the budget
composable across BatchEngine permit waits and HTTP middleware.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.deadline: Option<Instant>Absolute wall-clock deadline after which the lint pass MUST abort cooperatively. See struct-level docs for semantics — and the Phase 1 status note: the current build ignores this field, deadline-driven cancellation lands in Phase 2.
Trait Implementations§
Source§impl Clone for LintOptions
impl Clone for LintOptions
Source§fn clone(&self) -> LintOptions
fn clone(&self) -> LintOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more