pub struct NamedCheck {
pub name: &'static str,
pub run: Box<dyn FnOnce() -> Vec<DiagnosticResult> + Send + 'static>,
}Expand description
A single named check that can be scheduled on a worker thread.
The run closure must be plain and blocking; the parallel engine wraps it
in a timeout and turns crashes or hangs into a CheckStatus::Fail
diagnostic instead of propagating them.
Fields§
§name: &'static strDisplay name, used for timeout/crash diagnostics.
run: Box<dyn FnOnce() -> Vec<DiagnosticResult> + Send + 'static>The blocking check to run. May return zero or more diagnostics.
Implementations§
Source§impl NamedCheck
impl NamedCheck
Sourcepub fn single(
name: &'static str,
run: impl FnOnce() -> DiagnosticResult + Send + 'static,
) -> Self
pub fn single( name: &'static str, run: impl FnOnce() -> DiagnosticResult + Send + 'static, ) -> Self
Wraps a single-result check into a NamedCheck.
Auto Trait Implementations§
impl !RefUnwindSafe for NamedCheck
impl !Sync for NamedCheck
impl !UnwindSafe for NamedCheck
impl Forget for NamedCheck
impl Freeze for NamedCheck
impl Send for NamedCheck
impl Unpin for NamedCheck
impl UnsafeUnpin for NamedCheck
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